|
Orbital library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorbital.util.KeyValuePair
public class KeyValuePair
This class is a KeyValuePair that contains a pair 〈key,value〉 each of which are objects. An instance of KeyValuePair is mainly identified by its key value.
For equality and similar methods, only the key is considered.
Pair,
Map.Entry,
Serialized Form| Field Summary | |
|---|---|
protected java.lang.Object |
key
The key for this pair. |
protected java.lang.Object |
value
The value of this pair. |
| Constructor Summary | |
|---|---|
KeyValuePair()
|
|
KeyValuePair(java.lang.Object key,
java.lang.Object value)
Create a new pair 〈key, value〉. |
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object o)
Compare two KeyValuePair objects according to their keys. |
boolean |
equals(java.lang.Object o)
Checks two KeyValuePair objects for equal keys. |
java.lang.Object |
getKey()
Get/Set-Methods. |
java.lang.Object |
getValue()
|
int |
hashCode()
|
void |
setKey(java.lang.Object key)
|
void |
setValue(java.lang.Object value)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.Object key
protected java.lang.Object value
| Constructor Detail |
|---|
public KeyValuePair()
public KeyValuePair(java.lang.Object key,
java.lang.Object value)
| Method Detail |
|---|
public java.lang.Object getKey()
public void setKey(java.lang.Object key)
public java.lang.Object getValue()
public void setValue(java.lang.Object value)
public int compareTo(java.lang.Object o)
throws java.lang.ClassCastException
compareTo in interface java.lang.Comparableo - the (KeyValuePair) object to be compared to.
key.compareTo(o), when key implements Comparable.
java.lang.ClassCastException - when neither of the keys in the KeyValuePair objects compared implements Comparable,
or o is not even a KeyValuePair.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
Orbital library 1.3.0: 11 Apr 2009 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||