|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object structure5.Association<K,V> structure5.HashAssociation<K,V>
public class HashAssociation<K,V>
Implements an association that can be marked "reserved". Reserved associations can not be read without exception. Unreserved associations act normally.
Hashtable, Association
Constructor Summary | |
---|---|
HashAssociation(K key)
|
|
HashAssociation(K key,
V value)
|
Method Summary | |
---|---|
K |
getKey()
Fetch key from association. |
V |
getValue()
Fetch value from association. |
void |
reserve()
|
boolean |
reserved()
|
V |
setValue(V value)
Sets the value of the key-value pair. |
String |
toString()
Standard string representation of an association. |
Methods inherited from class structure5.Association |
---|
equals, hashCode |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HashAssociation(K key, V value)
public HashAssociation(K key)
Method Detail |
---|
public V getValue()
Association
getValue
in interface Map.Entry<K,V>
getValue
in class Association<K,V>
public K getKey()
Association
getKey
in interface Map.Entry<K,V>
getKey
in class Association<K,V>
public V setValue(V value)
Association
setValue
in interface Map.Entry<K,V>
setValue
in class Association<K,V>
value
- The new value.public boolean reserved()
public void reserve()
public String toString()
Association
toString
in class Association<K,V>
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |