org.neo4j.helpers
Class Pair<T1,T2>
java.lang.Object
org.neo4j.helpers.Pair<T1,T2>
- Direct Known Subclasses:
- Triplet
public abstract class Pair<T1,T2>
- extends java.lang.Object
Utility to handle pairs of objects.
|
Method Summary |
boolean |
equals(java.lang.Object obj)
|
abstract T1 |
first()
|
int |
hashCode()
|
static
|
of(T1 first,
T2 other)
Create a new pair of objects. |
abstract T2 |
other()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
of
public static <T1,T2> Pair<T1,T2> of(T1 first,
T2 other)
- Create a new pair of objects.
- Parameters:
first - the first object in the pair.other - the other object in the pair.
first
public abstract T1 first()
- Returns:
- the first object in the pair.
other
public abstract T2 other()
- Returns:
- the other object in the pair.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.