|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.monitorenter.util.collections.Entry
public final class Entry
I have written implementations of java.util.Map.Entry in form of
Almost all implementations were plainforward and not hiding any complexity.
One could not downcast them to get more methods, and they were replaceable.
That's it! Finally i decided to hardcode it here... .
But don't you start writing methods like:
public Entry getEntry(String name); public void setEntry(Entry entry);Try sticking to the interface java.util.Map.Entry.
Map.Entry
Constructor Summary | |
---|---|
Entry(Object key,
Object value)
Creates an instance with the given key and value. |
Method Summary | |
---|---|
Object |
getKey()
Maybe null! |
Object |
getValue()
Maybe null! |
Object |
setValue(Object value)
Sets a new value instance overwriting the old value which is returned. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Map.Entry |
---|
equals, hashCode |
Constructor Detail |
---|
public Entry(Object key, Object value)
key
- the key instance to use.value
- the value instance to use.Method Detail |
---|
public Object getKey()
getKey
in interface Map.Entry
Map.Entry.getKey()
public Object getValue()
getValue
in interface Map.Entry
Map.Entry.getValue()
public Object setValue(Object value)
You may use null. But you will get it back next call!
setValue
in interface Map.Entry
Map.Entry.setValue(java.lang.Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |