org.neo4j.helpers
Class Pair<T1,T2>

java.lang.Object
  extended by org.neo4j.helpers.Pair<T1,T2>
Direct Known Subclasses:
Triplet

public abstract class Pair<T1,T2>
extends Object

Utility to handle pairs of objects.


Method Summary
 boolean equals(Object obj)
           
abstract  T1 first()
           
 int hashCode()
           
static
<T1,T2> Pair<T1,T2>
of(T1 first, T2 other)
          Create a new pair of objects.
abstract  T2 other()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

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 String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2011 The Neo4j Graph Database Project. All Rights Reserved.