|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.japaki.beans.MapItemBean<K,V>
public final class MapItemBean<K,V>
A bean with a single property that is stored in an underlying map at a fixed key.
| Constructor Summary | |
|---|---|
MapItemBean(Map<K,V> map,
K key)
Constructs a new MapItemBean. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
K |
getKey()
|
V |
getValue()
Retrieves the value at the predefined key from the underlying map. |
int |
hashCode()
|
K |
setKey(K key)
Does nothing. |
V |
setValue(V value)
Stores the value at the predefined key in the underlying map. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MapItemBean(Map<K,V> map,
K key)
map - map where the property's value is stored and retrieved from.key - position of the property in the map
ClassCastException - if the key is of an inappropriate type for
the map
NullPointerException - if map is null or if
the key is null and the map does not permit null keys| Method Detail |
|---|
public K setKey(K key)
setKey in interface KeyValueBean<K,V>key - new key to be stored in this bean
IllegalArgumentException - if the specified key is not equal to
the old key.public K getKey()
getKey in interface Map.Entry<K,V>public V getValue()
getValue in interface Map.Entry<K,V>getValue in interface SinglePropertyBean<V>public V setValue(V value)
setValue in interface Map.Entry<K,V>setValue in interface SinglePropertyBean<V>value - value to be stored.
UnsupportedOperationException - depending on the underlying map
ClassCastException - depending on the underlying map
NullPointerException - depending on the underlying map
IllegalArgumentException - depending on the underlying mappublic int hashCode()
hashCode in interface Map.Entry<K,V>hashCode in class Objectpublic boolean equals(Object obj)
equals in interface Map.Entry<K,V>equals 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 | ||||||||