Sometimes we need to cache only singular object, without associating it with any key. In this case the use of Guava's LoadingCache is not well adapted. But fortunately, Guava provides another objects to deal with this situation - Suppliers.
Google Guava provides a lot of programming shortcuts. It contains a simplified version of String and primitives management. These features seem a little bit basic. However, Google's library simplifies also the work with more complex stuff as cache.
Working with files in Java, and more precisely, reading file streams, was always a little bit complicated. It's the reason why each new version of Java contains some improvements for that. And Google Guava, once again, appears as an alternative.
In one of previous articles we saw that Google Guava provides a listenable futures which are able to invoke callback methods. But it's not theirs single feature.
In two previous articles we discovered key concepts and concurrency features of Google Guava. Both of them simplify the programming. Another useful thing of this library is a message dispatching system called event bus.
Google Guava as a set of libraries used in Google projects couldn't not contain some worries about concurrency.
One of most "speaking" objects in Java is String. However, to achieve some operations we need to implement own methods. With Google Guava String support, operations on chain of characters are easier.
Another interesting feature of Google Guava is Java's primitves support which allows us to work easiest with booleans, ints, longs or even bytes, signed as well as unsigned.
External libraries are always helpful. They can help to resolve many "hot" programming problems, but also learn us the good rules of coding. One of this type of libraries in Java world is Google Guava.