A map which forwards all its method calls to another map. Subclasses should override one or more methods to modify the behavior of the backing map as desired per the decorator pattern. Warning: The methods of ForwardingMap forward indiscriminately to the methods of the delegate. For example, overriding #put alone will not change the behavior of #putAll, which can lead to unexpected behavior. In this case, you should override putAll as well, either providing your own implementation, or delegating to the provided standardPutAll method. default method warning: This class does not forward calls to default methods. Instead, it inherits their default implementations. When those implementations invoke methods, they invoke methods on the ForwardingMap. 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 a SortedMap whose comparator is not consistent with equals. The standard methods and the collection views they return are not guaranteed to be thread-safe, even when all of the methods that they depend on are thread-safe.
A builder for creating immutable SetMultimap instances, especially public static final multimaps ("constant multimaps"). Example: static final Multimap STRING_TO_INTEGER_MULTIMAP = new ImmutableSetMultimap.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 SetMultimap<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.
Returns a builder that creates immutable sorted maps with an explicit comparator. If the comparator has a more general type than the map's keys, such as creating a SortedMap with a Comparator, use the ImmutableSortedMap.Builder<K,V> constructor instead.
Copies all associations from the specified range map into this builder.
Returns a Collector that accumulates elements into an ImmutableMap whose keys and values are the result of applying the provided mapping functions to the input elements. Entries appear in the result ImmutableMap in encounter order. If the mapped keys contain duplicates (according to Object#equals(Object), an IllegalArgumentException is thrown when the collection operation is performed. (This differs from the Collector returned by Collectors#toMap(Function, Function), which throws an IllegalStateException.)
The hash code equals the value Arrays.asList(leftValue(), rightValue()).hashCode().