OME
Class Pair
java.lang.Object
|
+--OME.Pair
- public class Pair
- extends java.lang.Object
This class allows for the storage of two objects together by combining thier hash-values.
Field Summary |
java.lang.Object |
first
The first object in the pair. |
java.lang.Object |
second
The second object in the pair. |
Constructor Summary |
Pair(java.lang.Object first,
java.lang.Object second)
Creates a new Pair from the specified two objects. |
Method Summary |
boolean |
equals(java.lang.Object obj)
Returns whether a Pair matches this Pair, based on thier hash-codes. |
int |
hashCode()
Returns the combined hash-code of the two objects. |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
toString,
wait,
wait,
wait |
first
public java.lang.Object first
- The first object in the pair.
second
public java.lang.Object second
- The second object in the pair.
Pair
public Pair(java.lang.Object first,
java.lang.Object second)
- Creates a new Pair from the specified two objects.
- Parameters:
first
- the first object in the pairsecond
- the second object in the pair
hashCode
public int hashCode()
- Returns the combined hash-code of the two objects.
- Overrides:
- hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Returns whether a Pair matches this Pair, based on thier hash-codes.
- Overrides:
- equals in class java.lang.Object