Class ImmutableMap<K,V>
java.lang.Object
org.docx4j.com.google.common.collect.ImmutableMap<K,V>
- All Implemented Interfaces:
Serializable,Map<K,V>
@GwtCompatible(serializable=true,
emulated=true)
public abstract class ImmutableMap<K,V>
extends Object
implements Map<K,V>, Serializable
A
Map whose contents will never change, with many other important properties detailed at
ImmutableCollection.
See the Guava User Guide article on immutable collections.
- Since:
- 2.0
- See Also:
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidcheckNoConflict(boolean safe, String conflictDescription, Map.Entry<?, ?> entry1, Map.Entry<?, ?> entry2) (package private) static IllegalArgumentExceptionconflictException(String conflictDescription, Object entry1, Object entry2) static <K,V> ImmutableMap<K, V> Returns an immutable map containing the same entries asmap.(package private) abstract booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Constructor Details
-
ImmutableMap
public ImmutableMap()
-
-
Method Details
-
checkNoConflict
-
conflictException
static IllegalArgumentException conflictException(String conflictDescription, Object entry1, Object entry2) -
copyOf
Returns an immutable map containing the same entries asmap. The returned map iterates over entries in the same order as theentrySetof the original map. Ifmapsomehow contains entries with duplicate keys (for example, if it is aSortedMapwhose comparator is not consistent with equals), the results of this method are undefined.Despite the method name, this method attempts to avoid actually copying the data when it is safe to do so. The exact circumstances under which a copy will or will not be performed are undocumented and subject to change.
- Throws:
NullPointerException- if any key or value inmapis null
-
isPartialView
abstract boolean isPartialView()
-