public class Pair<K,V> extends Object implements Serializable
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object o)
Test this
Pair for equality with another
Object. |
K |
getKey()
Gets the key for this pair.
|
V |
getValue()
Gets the value for this pair.
|
int |
hashCode()
Generate a hash code for this
Pair. |
String |
toString()
String representation of this
Pair. |
public K getKey()
public V getValue()
public String toString()
String representation of this
Pair.
The default name/value delimiter '=' is always used.
public int hashCode()
Generate a hash code for this Pair.
The hash code is calculated using both the name and
the value of the Pair.
public boolean equals(Object o)
Test this Pair for equality with another
Object.
If the Object to be tested is not a
Pair or is null, then this method
returns false.
Two Pairs are considered equal if and only if
both the names and values are equal.
Copyright © 2014–2019 码农场. All rights reserved.