|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
edu.mit.csail.sdg.alloy4.ConstMap<K,V>
K - - the type of keyV - - the type of valuepublic final class ConstMap<K,V>
Immutable; implements a map based on hashCode() and equals(); null key and values are allowed.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry<K,V> |
| Method Summary | ||
|---|---|---|
boolean |
containsKey(java.lang.Object key)
Returns true if exists at least one (k, v) mapping where (k==null ? key==null : k.equals(key)) |
|
boolean |
containsValue(java.lang.Object value)
Returns true if exists at least one (k, v) mapping where (v==null ? value==null : v.equals(value)) |
|
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet()
Returns an unmodifiable view of the mappings in this map. |
|
V |
get(java.lang.Object key)
Returns the value associated with the key (or null if not found); null is also returned if the given key maps to null. |
|
java.util.Set<K> |
keySet()
Returns an unmodifiable view of the keys in this map. |
|
static
|
make()
Returns an unmodifiable empty map. |
|
static
|
make(java.util.Map<K,V> map)
Returns an unmodifiable map with the same entries and traversal order as the given map. |
|
int |
size()
Returns the number of (key, value) mapping in this map. |
|
java.util.Collection<V> |
values()
Returns an unmodifiable view of the values in this map. |
|
| Methods inherited from class java.util.AbstractMap |
|---|
clear, clone, equals, hashCode, isEmpty, put, putAll, remove, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static <K,V> ConstMap<K,V> make()
public static <K,V> ConstMap<K,V> make(java.util.Map<K,V> map)
public java.util.Set<java.util.Map.Entry<K,V>> entrySet()
entrySet in interface java.util.Map<K,V>entrySet in class java.util.AbstractMap<K,V>public java.util.Set<K> keySet()
keySet in interface java.util.Map<K,V>keySet in class java.util.AbstractMap<K,V>public java.util.Collection<V> values()
values in interface java.util.Map<K,V>values in class java.util.AbstractMap<K,V>public int size()
size in interface java.util.Map<K,V>size in class java.util.AbstractMap<K,V>public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<K,V>containsKey in class java.util.AbstractMap<K,V>public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<K,V>containsValue in class java.util.AbstractMap<K,V>public V get(java.lang.Object key)
get in interface java.util.Map<K,V>get in class java.util.AbstractMap<K,V>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||