edu.uci.ics.jung.utils
Class Pair
java.lang.Object
edu.uci.ics.jung.utils.Pair
- public final class Pair
- extends java.lang.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
Constructor Summary |
Pair(java.lang.Object value1,
java.lang.Object value2)
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
Pair
public Pair(java.lang.Object value1,
java.lang.Object value2)
getFirst
public java.lang.Object getFirst()
getSecond
public java.lang.Object getSecond()
equals
public boolean equals(java.lang.Object o)
hashCode
public int hashCode()