Constructor and Description |
---|
SimpleImmutableEntry(K theKey,
V theValue)
Constructs a new instance by key and value.
|
SimpleImmutableEntry(Map.Entry<? extends K,? extends V> entry)
Constructs a new instance by an entry
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object)
Answers whether the object is equal to this entry.
|
K |
getKey()
Returns the key.
|
V |
getValue()
Returns the value.
|
int |
hashCode()
Answers the hash code of this entry.
|
V |
setValue(V object)
Throws an UnsupportedOperationException.
|
String |
toString()
Answers a String representation of this entry.
|
public SimpleImmutableEntry(K theKey, V theValue)
theKey
- the keytheValue
- the valuepublic K getKey()
getKey
in interface Map.Entry<K,V>
Map.Entry.getKey()
public V getValue()
getValue
in interface Map.Entry<K,V>
Map.Entry.getValue()
public V setValue(V object)
setValue
in interface Map.Entry<K,V>
object
- new valueUnsupportedOperationException
- alwaysMap.Entry.setValue(java.lang.Object)
public boolean equals(Object object)
public int hashCode()
public String toString()
toString
in class Object
Object.toString()