cascading.tuple
Class TuplePair

java.lang.Object
  extended by cascading.tuple.Tuple
      extended by cascading.tuple.TuplePair
All Implemented Interfaces:
Serializable, Comparable, Iterable

public class TuplePair
extends Tuple

Class TuplePair is a utility class that is optimized to hold two Tuple instances for sorting and hashing of each part independently.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class cascading.tuple.Tuple
elements, isUnmodifiable
 
Constructor Summary
TuplePair()
          Constructor Tuple creates a new Tuple instance.
TuplePair(Tuple lhs, Tuple rhs)
          Constructor TuplePair creates a new TuplePair instance.
 
Method Summary
 int compareTo(Object other)
          Method compareTo implements the Comparable.compareTo(Object) method.
 int compareTo(Tuple other)
          Method compareTo compares this Tuple to the given Tuple instance.
 int compareTo(TuplePair tuplePair)
          Method compareTo compares this instance to the given TuplePair.
 boolean equals(Object object)
           
 Tuple getLhs()
          Method getLhs returns the lhs of this TuplePair object.
 Tuple getRhs()
          Method getRhs returns the rhs of this TuplePair object.
 int hashCode()
           
 String print()
          Method print returns a parsable String representation of this Tuple instance.
 String toString()
           
 
Methods inherited from class cascading.tuple.Tuple
add, add, addAll, addAll, append, asUnmodifiable, clear, compareTo, elements, format, get, get, get, getBoolean, getDouble, getFloat, getInteger, getLong, getObject, getShort, getString, getTypes, isEmpty, isUnmodifiable, iterator, leave, parse, print, put, remove, remove, set, set, size, size, size, toString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TuplePair

public TuplePair()
Constructor Tuple creates a new Tuple instance.


TuplePair

public TuplePair(Tuple lhs,
                 Tuple rhs)
Constructor TuplePair creates a new TuplePair instance.

Parameters:
lhs - of type Tuple
rhs - of type Tuple
Method Detail

getLhs

public Tuple getLhs()
Method getLhs returns the lhs of this TuplePair object.

Returns:
the lhs (type Tuple) of this TuplePair object.

getRhs

public Tuple getRhs()
Method getRhs returns the rhs of this TuplePair object.

Returns:
the rhs (type Tuple) of this TuplePair object.

equals

public boolean equals(Object object)
Overrides:
equals in class Tuple

hashCode

public int hashCode()
Overrides:
hashCode in class Tuple

compareTo

public int compareTo(Object other)
Description copied from class: Tuple
Method compareTo implements the Comparable.compareTo(Object) method.

Specified by:
compareTo in interface Comparable
Overrides:
compareTo in class Tuple
Parameters:
other - of type Object
Returns:
int

compareTo

public int compareTo(Tuple other)
Description copied from class: Tuple
Method compareTo compares this Tuple to the given Tuple instance.

Overrides:
compareTo in class Tuple
Parameters:
other - of type Tuple
Returns:
int

compareTo

public int compareTo(TuplePair tuplePair)
Method compareTo compares this instance to the given TuplePair.

Parameters:
tuplePair - of type TuplePair
Returns:
int

toString

public String toString()
Overrides:
toString in class Tuple

print

public String print()
Description copied from class: Tuple
Method print returns a parsable String representation of this Tuple instance.

Overrides:
print in class Tuple
Returns:
String


Copyright © 2007-2010 Concurrent, Inc. All Rights Reserved.