org.apache.hadoop.mrunit.types
Class Pair<S,T>

java.lang.Object
  extended by org.apache.hadoop.mrunit.types.Pair<S,T>
Type Parameters:
S -
T -
All Implemented Interfaces:
Comparable<Pair<S,T>>

public class Pair<S,T>
extends Object
implements Comparable<Pair<S,T>>

A very basic pair type that does not allow null values.


Nested Class Summary
static class Pair.FirstElemComparator<S,T>
           
static class Pair.SecondElemComparator<S,T>
           
 
Constructor Summary
Pair(S car, T cdr)
           
 
Method Summary
 int compareTo(Pair<S,T> p)
           
 boolean equals(Object o)
           
 S getFirst()
           
 T getSecond()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pair

public Pair(S car,
            T cdr)
Method Detail

getFirst

public S getFirst()

getSecond

public T getSecond()

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(Pair<S,T> p)
Specified by:
compareTo in interface Comparable<Pair<S,T>>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.