|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.brains2b.collection.MapEntry
A straightforward implementation of the Map.Entry interface outside the Map class
Map.Entry| Constructor Summary | |
MapEntry()
Default Constructor for MapEntry. |
|
MapEntry(java.lang.Object key)
Constructor for MapEntry. |
|
MapEntry(java.lang.Object key,
java.lang.Object value)
Constructor for MapEntry. |
|
| Method Summary | |
boolean |
equals(java.lang.Object obj)
Compares this EntryImpl to another object to see if they are equal The following rules apply: If comparing a EntryImpl equals returns true if they have the same key If comparing a String equals returns true if the String equals the key In all other cases false is returned. |
java.lang.Object |
getKey()
|
java.lang.Object |
getValue()
|
java.lang.Object |
setKey(java.lang.Object key)
sets the Key |
java.lang.Object |
setValue(java.lang.Object value)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Map.Entry |
hashCode |
| Constructor Detail |
public MapEntry()
public MapEntry(java.lang.Object key)
Initializes the MapEntry with key. use setValue to set the value
key - Object
public MapEntry(java.lang.Object key,
java.lang.Object value)
Initializes the MapEntry with key and value
key - Objectvalue - Object| Method Detail |
public java.lang.Object getKey()
getKey in interface java.util.Map.EntryMap.Entry.getKey()public java.lang.Object getValue()
getValue in interface java.util.Map.EntryMap.Entry.getValue()public java.lang.Object setValue(java.lang.Object value)
setValue in interface java.util.Map.EntryMap.Entry.setValue(Object)public java.lang.Object setKey(java.lang.Object key)
Prefered method is using the Constructor to initialize the object with at least the key instead of setting or updating the key here.
key - Stringpublic boolean equals(java.lang.Object obj)
equals in interface java.util.Map.EntryObject.equals(Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||