|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--gausssoft.collections.MapEntry
A simple implementation of the Map.Entry interface.
Map.Entry, Serialized Form| Constructor Summary | |
MapEntry(Map.Entry e)
Creates a new MapEntry based on another Map.Entry object. |
|
MapEntry(Object key,
Object value)
Creates a new MapEntry. |
|
| Method Summary | |
Object |
clone()
Clones this MapEntry. |
boolean |
equals(Object obj)
Compares this object to another object. |
boolean |
equalsKey(Map.Entry e)
Compares this MapEntry's key to the key of another Map.Entry object. |
boolean |
equalsValue(Map.Entry e)
Compares this MapEntry's value to the value of another Map.Entry object. |
Object |
getKey()
Returns the key. |
Object |
getValue()
Returns the value. |
int |
hashCode()
Generates a hashcode for this object. |
Object |
setValue(Object obj)
Sets the value. |
String |
toString()
Generates a string repesentation of this object. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public MapEntry(Object key,
Object value)
key - The key.value - The value.public MapEntry(Map.Entry e)
Map.Entry object.e - The Map.Entry to base this object on.NullPointerException - If e is null.| Method Detail |
public final boolean equalsKey(Map.Entry e)
e - The Entry object to compare it to.true if both objects have the same key.NullPointerException - If e is null.public final boolean equalsValue(Map.Entry e)
e - The Entry object to compare it to.true if both objects have the same value.NullPointerException - If e is null.public boolean equals(Object obj)
equals in interface Map.Entryequals in class Objecttrue if this object matches the provided object.public final Object getKey()
getKey in interface Map.Entrypublic final Object getValue()
getValue in interface Map.Entrypublic Object setValue(Object obj)
setValue in interface Map.Entryvalue - The new value of this MapEntry.public int hashCode()
key.hashCode() ^ value.hashCode()
hashCode in interface Map.EntryhashCode in class Objectpublic Object clone()
clone in interface CloneableObjectclone in class Objectpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||