|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.molae.pipe.basic.AbstractMapEntry<K,V>
public abstract class AbstractMapEntry<K,V>
This class provides a skeletal implementation of the Map.Entry interface,
to minimize the effort required to implement this interface.
It contains a property to store the key of the map entry.
To implement an unmodifiable map, only
getValue() has to be implemented.
To implement a modifiable map, setValue(Object) must additionally
be specified.
| Constructor Summary | |
|---|---|
protected |
AbstractMapEntry(K pKey)
Constructs a new AbstractMapEntry object. |
| Method Summary | |
|---|---|
boolean |
equals(Object o)
Is implemented as described in the comment to the Map.Entry.equals(Object) method. |
K |
getKey()
This implementation returns the content of the key
property. |
abstract V |
getValue()
|
int |
hashCode()
Is implemented as described in the comment to the Map.Entry.hashCode() method. |
V |
setValue(V value)
This implementation always throws an UnsupportedOperationException. |
String |
toString()
Returns the content of this map entry in format key=value. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractMapEntry(K pKey)
pKey - the key corresponding to this entry.| Method Detail |
|---|
public boolean equals(Object o)
Map.Entry.equals(Object) method.
equals in interface Map.Entry<K,V>equals in class Objectpublic K getKey()
key
property.
getKey in interface Map.Entry<K,V>public abstract V getValue()
getValue in interface Map.Entry<K,V>public int hashCode()
Map.Entry.hashCode() method.
hashCode in interface Map.Entry<K,V>hashCode in class Objectpublic V setValue(V value)
UnsupportedOperationException.
setValue in interface Map.Entry<K,V>UnsupportedOperationException - alwaysgetValue()public String toString()
key=value.
toString in class Objectkey=value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||