edu.uci.ics.jung.utils
Class Pair
java.lang.Object
edu.uci.ics.jung.utils.Pair
public final class Pair
- extends Object
Stores a pair of values together. Access either one by directly
getting the fields. Pairs are not mutable, respect equals
and may be used as indices.
Note that they do not protect from malevolent behavior: if one or another
object in the tuple is mutable, then that can be changed with the usual bad
effects.
- Author:
- scott white and Danyel Fisher
Pair
public Pair(Object value1,
Object value2)
getFirst
public Object getFirst()
getSecond
public Object getSecond()
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object