TKey
- The key type.TValue
- The value type.public final class KeyValuePair<TKey,TValue>
extends java.lang.Object
Constructor and Description |
---|
KeyValuePair(TKey key,
TValue value)
Initializes class with a key and a value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(KeyValuePair<? extends TKey,? extends TValue> kvp)
Compares two key/value pairs for equality.
|
boolean |
equals(java.lang.Object other)
Compares two key/value pairs for equality.
|
TKey |
getKey() |
TValue |
getValue() |
int |
hashCode() |
java.lang.String |
toString() |
public TKey getKey()
public TValue getValue()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- The other key/value pair.public boolean equals(KeyValuePair<? extends TKey,? extends TValue> kvp)
kvp
- The other key/value pair.java.lang.NullPointerException
- When the key/value pair is null.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object