|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.alee.utils.general.Pair<K,V>
public class Pair<K,V>
This class represents single name-value pair.
Field Summary | |
---|---|
K |
key
Key of this Pair . |
V |
value
Value of this this Pair . |
Constructor Summary | |
---|---|
Pair()
Constructs a new pair with null key and value. |
|
Pair(K key)
Constructs a new pair with null value. |
|
Pair(K key,
V value)
Constructs a new pair |
Method Summary | |
---|---|
Pair<K,V> |
clone()
|
boolean |
equals(java.lang.Object o)
|
K |
getKey()
Gets the key for this pair. |
V |
getValue()
Gets the value for this pair. |
int |
hashCode()
|
void |
setKey(K key)
Sets the key for this pair. |
void |
setValue(V value)
Sets the value for this pair. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
@XStreamAsAttribute public K key
Pair
.
@XStreamAsAttribute public V value
Pair
.
Constructor Detail |
---|
public Pair()
null
key and value.
public Pair(K key)
null
value.
key
- The key for this pairpublic Pair(K key, V value)
key
- The key for this pairvalue
- The value to use for this pairMethod Detail |
---|
public K getKey()
public void setKey(K key)
key
- new key for this pairpublic V getValue()
public void setValue(V value)
value
- new value for this pairpublic java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public Pair<K,V> clone()
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |