Package dictionary
Class Dictionary.Entry<K,V>
java.lang.Object
dictionary.Dictionary.Entry<K,V>
- Type Parameters:
K
- Key (must be immutable).V
- Value.
- Enclosing interface:
- Dictionary<K,V>
A dictionary entry (key-value pair).
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Entry
- Parameters:
key
-value
-
-
-
Method Details
-
getKey
Returns the key corresponding to this entry.- Returns:
- the key corresponding to this entry
-
getValue
Returns the value corresponding to this entry.- Returns:
- the value corresponding to this entry
-
setValue
Replaces the value corresponding to this entry with the specified value.- Parameters:
v
- new value to be stored in this entry- Returns:
- old value corresponding to the entry
-
toString
-