|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.inject.internal.util.Maps
public final class Maps
Static utility methods pertaining to Map instances. Also see this
class's counterparts Lists and Sets.
| Method Summary | ||
|---|---|---|
static
|
immutableEntry(K key,
V value)
Returns an immutable map entry with the specified key and value. |
|
static
|
newHashMap()
Creates a HashMap instance. |
|
static
|
newIdentityHashMap()
Creates an IdentityHashMap instance. |
|
static
|
newLinkedHashMap()
Creates an insertion-ordered LinkedHashMap instance. |
|
static
|
newTreeMap()
Creates a TreeMap instance using the natural ordering of its
elements. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <K,V> HashMap<K,V> newHashMap()
HashMap instance.
Note: if you don't actually need the resulting map to be mutable,
use Collections.emptyMap() instead.
HashMappublic static <K,V> LinkedHashMap<K,V> newLinkedHashMap()
LinkedHashMap instance.
LinkedHashMappublic static <K extends Comparable,V> TreeMap<K,V> newTreeMap()
TreeMap instance using the natural ordering of its
elements.
TreeMappublic static <K,V> IdentityHashMap<K,V> newIdentityHashMap()
IdentityHashMap instance.
IdentityHashMap
public static <K,V> Map.Entry<K,V> immutableEntry(@Nullable
K key,
@Nullable
V value)
Map.Entry.setValue(V) operation throws an UnsupportedOperationException.
The returned entry is serializable.
key - the key to be associated with the returned entryvalue - the value to be associated with the returned entry
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||