Package org.apache.pivot.collections
Class Dictionary.Pair<K,V>
- java.lang.Object
-
- org.apache.pivot.collections.Dictionary.Pair<K,V>
-
- Type Parameters:
K
- Type of the key part of the pair.V
- Type of the value in the pair.
- All Implemented Interfaces:
java.io.Serializable
- Enclosing interface:
- Dictionary<K,V>
public static final class Dictionary.Pair<K,V> extends java.lang.Object implements java.io.Serializable
Class representing a key/value pair.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
Pair
public Pair(K newKey, V newValue)
The only constructor for this class that takes both the key and the value to be stored, ensuring they are both set all the time.- Parameters:
newKey
- The "key" to be stored.newValue
- The "value" to be associated with that key.- Throws:
java.lang.IllegalArgumentException
- if the key isnull
.
-
-