org.hypergraphdb.util
Class Pair<F,S>
java.lang.Object
org.hypergraphdb.util.Pair<F,S>
public class Pair<F,S>
- extends java.lang.Object
The inexplicably missing class from the java.util package. A generic, immutable Pair
class. Hash code computed at construction time and cached.
- Author:
- Borislav Iordanov
|
Constructor Summary |
Pair(F first,
S second)
|
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Pair
public Pair(F first,
S second)
getFirst
public F getFirst()
getSecond
public S getSecond()
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object