public static class AbstractMap.SimpleEntry
extends java.lang.Object
implements java.util.Map.Entry
| Constructor and Description |
|---|
AbstractMap.SimpleEntry(java.util.Map.Entry entry)
Creates an entry representing the same mapping as the
specified entry.
|
AbstractMap.SimpleEntry(java.lang.Object key,
java.lang.Object value)
Creates an entry representing a mapping from the specified
key to the specified value.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.lang.Object |
getKey()
Returns the key corresponding to this entry.
|
java.lang.Object |
getValue()
Returns the value corresponding to this entry.
|
int |
hashCode() |
java.lang.Object |
setValue(java.lang.Object value)
Replaces the value corresponding to this entry with the specified
value.
|
java.lang.String |
toString()
Returns a String representation of this map entry.
|
public AbstractMap.SimpleEntry(java.lang.Object key,
java.lang.Object value)
key - the key represented by this entryvalue - the value represented by this entrypublic AbstractMap.SimpleEntry(java.util.Map.Entry entry)
entry - the entry to copypublic java.lang.Object getKey()
getKey in interface java.util.Map.Entrypublic java.lang.Object getValue()
getValue in interface java.util.Map.Entrypublic java.lang.Object setValue(java.lang.Object value)
setValue in interface java.util.Map.Entryvalue - new value to be stored in this entrypublic boolean equals(java.lang.Object o)
equals in interface java.util.Map.Entryequals in class java.lang.Objectpublic int hashCode()
hashCode in interface java.util.Map.EntryhashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object