Guava – Bimap Interface
A BiMap is a special kind of map which maintains an inverse view of the map while ensuring that no duplicate values are present in the map and a value…
Guava
A BiMap is a special kind of map which maintains an inverse view of the map while ensuring that no duplicate values are present in the map and a value…
Multimap interface extends Map so that its keys can be mapped to multiple values at a time. Interface Declaration Following is the declaration for com.google.common.collect.Multimap<K,V> interface − @GwtCompatible public interface Multimap<K,V> Interface…
Multiset interface extends ‘Set’ to have duplicate elements, and provides various utility methods to deal with the occurrences of such elements in a set. Interface Declaration Following is the declaration…
Guava introduces many advanced collections based on developers' experience in application development works. Given below is a list of useful collections − Sr.NoCollection name & Description1MultisetAn extension to Set interface…
Throwables class provides utility methods related to Throwable interface. Class Declaration Following is the declaration for com.google.common.base.Throwables class − public final class Throwables extends Object Class Methods Sr.NoMethod & Description1static List<Throwable> getCausalChain(Throwable…
Range class represents an interval or a sequence. It is used to get a set of numbers/ strings lying in a particular range. Class Declaration Following is the declaration for com.google.common.collect.Range<C> class…
Objects class provides helper functions applicable to all objects such as equals, hashCode, etc. Class Declaration Following is the declaration for com.google.common.base.Objects class − @GwtCompatible public final class Objects extends Object Class…
Ordering class can be seen as an enriched comparator with enhanced chaining functionality, multiple utility methods, multi-type sorting capability, etc. Class Declaration Following is the declaration for com.google.common.collect.Ordering<T> class − @GwtCompatible public…
Preconditions provide static methods to check that a method or a constructor is invoked with proper parameter or not. It checks the pre-conditions. Its methods throw IllegalArgumentException on failure. Class…
Optional class is an immutable object used to contain a not-null object. Optional object is used to represent null with absent value. This class has various utility methods to facilitate…