Category Archives: Guava

PHPHOST BLOG

Web Hosting Related Articles You May Need

Guava Presents Java Throwable Stack Trace as Single String

Tip #5 of my blog post Ten Tips for Using Java Stack Traces demonstrates two example of using Java code to extract a Throwable’s (implying Error or Exception) stack trace into a single String representation using either PrintWriter or PrintStream. Thes… Continue reading

Posted in Guava, Syndicated | Leave a comment

Guava Preconditions Class

Anyone who’s written much Java has probably written methods that begin with conditionals that verify either the provided parameters or the state of the object being acted upon before proceeding with the remainder of the method’s implementation. These c… Continue reading

Posted in Guava, Syndicated | Leave a comment

Guava’s Objects Class: Equals, HashCode, and ToString

If you are fortunate enough to be using JDK 7, the newly available Objects class is the obvious (at least to me) choice for implementing the “common” Java object methods such as equals(Object) [with Objects.equals(Object,Object)], hashCode() [with Obje… Continue reading

Posted in Guava, Syndicated | Leave a comment

Guava’s Bidirectional Maps

Google Guava has much to offer the Java developer working with J2SE 5, Java SE 6, or Java SE 7. The older the version of these being used, the more useful Guava can be. Although Java SE 7 brings select Guava-provided functionality to the Java programmi… Continue reading

Posted in Guava, Java (General), Syndicated | Leave a comment

Checking for Null or Empty or White Space Only String in Java

.NET Framework 4 introduces a new method on its String class called IsNullOrWhiteSpace that checks whether a provided String is null, empty, or consists only of “white space.” This handy method is in addition to the method IsNullOrEmpty that has been a… Continue reading

Posted in Apache Commons, Groovy, Guava, Java (General), Syndicated | Leave a comment