de.hpi.fgis.voidgen.hadoop.datatypes
Class Pair<T1,T2>

java.lang.Object
  extended by de.hpi.fgis.voidgen.hadoop.datatypes.Pair<T1,T2>
Type Parameters:
T1 - The type of the left element of the pair.
T2 - The type of the right element of the pair.
Direct Known Subclasses:
SPCntTriple, Step1Pair, Step2Pair, StringIntPair, StringStringPair

public class Pair<T1,T2>
extends java.lang.Object

Represents a pair of arbitrary types.

Version:
0.20110912
Author:
Johannes Gosda, Hasso Plattner Institute at University of Potsdam, Germany

Field Summary
protected  T1 left
          The left part of the pair.
protected  T2 right
          The right part of the pair.
 
Constructor Summary
Pair()
          Default constructor.
Pair(T1 left, T2 right)
          Constructor for creation of a pair with given values.
 
Method Summary
 T1 getLeft()
          Getter.
 T2 getRight()
          Getter.
 int hashCode()
           
 void setLeft(T1 left)
          Setter.
 void setRight(T2 right)
          Setter.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

left

protected T1 left
The left part of the pair.


right

protected T2 right
The right part of the pair.

Constructor Detail

Pair

public Pair(T1 left,
            T2 right)
Constructor for creation of a pair with given values.

Parameters:
left - The left value.
right - The right value.

Pair

public Pair()
Default constructor.

Method Detail

getLeft

public T1 getLeft()
Getter.

Returns:
the left part of the pair.

getRight

public T2 getRight()
Getter.

Returns:
the right part of the pair.

setLeft

public void setLeft(T1 left)
Setter.

Parameters:
left - The left element of the pair.

setRight

public void setRight(T2 right)
Setter.

Parameters:
right - The right element of the pair.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object