Constructor and Description |
---|
SimpleEntry(K theKey,
V theValue)
Constructs a new instance by key and value.
|
SimpleEntry(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)
Sets the value of this entry to the specified value, replacing any
existing value.
|
String |
toString()
Answers a String representation of this entry.
|
public SimpleEntry(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
- the new value to set.Map.Entry.setValue(java.lang.Object)
public boolean equals(Object object)
public int hashCode()
public String toString()
toString
in class Object
Object.toString()