Interface KeyValuePair<O>
-
- Type Parameters:
O- The type of the value
- All Known Implementing Classes:
ConcurrentRadixTree.KeyValuePairImpl
public interface KeyValuePair<O>Encapsulates a key and a value.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Compares thisKeyValuePairobject with another for equality.java.lang.CharSequencegetKey()Returns the key with which the value is associatedOgetValue()Returns the value associated with the keyinthashCode()Returns a hash code for this object.java.lang.StringtoString()Returns a string representation as(key, value).
-
-
-
Method Detail
-
getKey
java.lang.CharSequence getKey()
Returns the key with which the value is associated- Returns:
- The key with which the value is associated
-
getValue
O getValue()
Returns the value associated with the key- Returns:
- The value associated with the key
-
equals
boolean equals(java.lang.Object o)
Compares thisKeyValuePairobject with another for equality. This is implemented based on equality of the keys.- Overrides:
equalsin classjava.lang.Object- Parameters:
o- The other object to compare- Returns:
- True if the other object is also a
KeyValuePairand is equal to this one as specified above
-
hashCode
int hashCode()
Returns a hash code for this object.- Overrides:
hashCodein classjava.lang.Object
-
toString
java.lang.String toString()
Returns a string representation as(key, value).- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation as
(key, value)
-
-