A BiMap<K,V> backed by two hash tables. This implementation allows null keys and values. A HashBiMap and its inverse are both serializable. This implementation guarantees insertion-based iteration order of its keys. See the Guava User Guide article on BiMap .
A ListMultimap<K,V> whose contents will never change, with many other important properties detailed at ImmutableCollection<E>. See the Guava User Guide article on immutable collections.
A builder for creating immutable multimap instances, especially public static final multimaps ("constant multimaps"). Example: static final Multimap STRING_TO_INTEGER_MULTIMAP = new ImmutableMultimap.Builder() .put("one", 1) .putAll("several", 1, 2, 3) .putAll("many", 1, 2, 3, 4, 5) .build(); Builder instances can be reused; it is safe to call #build multiple times to build multiple multimaps in series. Each multimap contains the key-value mappings in the previously created multimaps.
A builder for immutable range maps. Overlapping ranges are prohibited.
Implementation of Multimap that does not allow duplicate key-value entries and that returns collections whose iterators follow the ordering in which the data was added to the multimap. The collections returned by keySet, keys, and asMap iterate through the keys in the order they were first added to the multimap. Similarly, get, removeAll, and replaceValues return collections that iterate through the values in the order they were added. The collections generated by entries and values iterate across the key-value mappings in the order they were added to the multimap. The iteration ordering of the collections generated by keySet, keys, and asMap has a few subtleties. As long as the set of keys remains unchanged, adding or removing mappings does not affect the key iteration order. However, if you remove all values associated with a key and then add the key back to the multimap, that key will come last in the key iteration order. The multimap does not store duplicate key-value pairs. Adding a new key-value pair equal to an existing key-value pair has no effect. Keys and values may be null. All optional multimap methods are supported, and all returned views are modifiable. This class is not threadsafe when any concurrent operations update the multimap. Concurrent read operations will work correctly. To allow concurrent update operations, wrap your multimap with a call to Multimaps#synchronizedSetMultimap. See the Guava User Guide article on Multimap.
A map entry which forwards all its method calls to another map entry. Subclasses should override one or more methods to modify the behavior of the backing map entry as desired per the decorator pattern. Warning: The methods of ForwardingMapEntry forward indiscriminately to the methods of the delegate. For example, overriding #getValue alone will not change the behavior of #equals, which can lead to unexpected behavior. In this case, you should override equals as well, either providing your own implementation, or delegating to the provided standardEquals method. Each of the standard methods, where appropriate, use equal to test equality for both keys and values. This may not be the desired behavior for map implementations that use non-standard notions of key equality, such as the entry of a SortedMap whose comparator is not consistent with equals. The standard methods are not guaranteed to be thread-safe, even when all of the methods that they depend on are thread-safe.