Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
boolean |
equalsByReference(KeyFMap o)
Checks if other
KeyFMap equals to this, assuming reference equality for the values |
<V> V |
get(Key<V> key)
Returns a value associated with given key in this
KeyFMap , or null if no value is associated. |
Key [] |
getKeys() |
int |
getValueIdentityHashCode() |
int |
hashCode() |
boolean |
isEmpty() |
KeyFMap |
minus(Key<?> key)
Returns a KeyFMap which consists of the same elements as this KeyFMap, except
the supplied key which is removed.
|
<V> KeyFMap |
plus(Key<V> key,
V value)
Returns a
KeyFMap which consists of the same elements as this KeyFMap , but
the key key is associated with the supplied value . |
int |
size() |
java.lang.String |
toString() |
public <V> KeyFMap plus(Key<V> key, V value)
KeyFMap
KeyFMap
which consists of the same elements as this KeyFMap
, but
the key key
is associated with the supplied value
. May return itself if the key
is already associated with the supplied value
.public int size()
public KeyFMap minus(Key<?> key)
KeyFMap
public <V> V get(Key<V> key)
KeyFMap
KeyFMap
, or null if no value is associated.
Note that unlike HashMap
KeyFMap
cannot hold null values.public java.lang.String toString()
toString
in class java.lang.Object
public boolean isEmpty()
public int getValueIdentityHashCode()
getValueIdentityHashCode
in interface KeyFMap
System.identityHashCode(Object)
for values.public Key [] getKeys()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean equalsByReference(KeyFMap o)
KeyFMap
KeyFMap
equals to this, assuming reference equality for the valuesequalsByReference
in interface KeyFMap
o
- KeyFMap
to compare with