|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.core.util.backport.java.util.AbstractMap.SimpleEntry
public static class AbstractMap.SimpleEntry
An Entry maintaining a key and a value. The value may be changed using the setValue method. This class facilitates the process of building custom map implementations. For example, it may be convenient to return arrays of SimpleEntry instances in method Map.entrySet().toArray
| Constructor Summary | |
|---|---|
AbstractMap.SimpleEntry(Map.Entry entry)
Creates an entry representing the same mapping as the specified entry. |
|
AbstractMap.SimpleEntry(Object key,
Object value)
Creates an entry representing a mapping from the specified key to the specified value. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
|
Object |
getKey()
Returns the key corresponding to this entry. |
Object |
getValue()
Returns the value corresponding to this entry. |
int |
hashCode()
|
Object |
setValue(Object value)
Replaces the value corresponding to this entry with the specified value. |
String |
toString()
Returns a String representation of this map entry. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractMap.SimpleEntry(Object key,
Object value)
key - the key represented by this entryvalue - the value represented by this entrypublic AbstractMap.SimpleEntry(Map.Entry entry)
entry - the entry to copy| Method Detail |
|---|
public Object getKey()
getKey in interface Map.Entrypublic Object getValue()
getValue in interface Map.Entrypublic Object setValue(Object value)
setValue in interface Map.Entryvalue - new value to be stored in this entry
public boolean equals(Object o)
equals in interface Map.Entryequals in class Objectpublic int hashCode()
hashCode in interface Map.EntryhashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||