edu.uci.ics.jung.utils
Class Pair

java.lang.Object
  extended byedu.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)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.Object getFirst()
           
 java.lang.Object getSecond()
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pair

public Pair(java.lang.Object value1,
            java.lang.Object value2)
Method Detail

getFirst

public java.lang.Object getFirst()

getSecond

public java.lang.Object getSecond()

equals

public boolean equals(java.lang.Object o)

hashCode

public int hashCode()