cascading.tuple.io

## Class TuplePair

- java.lang.Object
- - cascading.tuple.Tuple
  - - cascading.tuple.io.TuplePair

All Implemented Interfaces:
  Resettable2<Tuple,Tuple>, java.io.Serializable, java.lang.Comparable<java.lang.Object>, java.lang.Iterable<java.lang.Object>

    public class TuplePair
    extends Tuple
    implements Resettable2<Tuple,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, NULL`

### Constructor Summary

Constructors
Constructor and Description
`TuplePair()` Constructor Tuple creates a new Tuple instance.
`TuplePair(Tuple lhs, Tuple rhs)` Constructor TuplePair creates a new TuplePair instance.

### Method Summary

Methods
`int` `compareTo(java.lang.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(java.lang.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()`
`java.lang.String` `print()` Method print returns a parsable String representation of this Tuple instance.
`void` `reset(Tuple lhs, Tuple rhs)`
`java.lang.String` `toString()`
`static Tuple[]` `tuples(TuplePair tuplePair)` Returns a reference to the private tuples of the given TuplePark

### Methods inherited from class cascading.tuple.Tuple

`add, add, addAll, addAll, addBoolean, addDouble, addFloat, addInteger, addLong, addShort, addString, append, clear, compareTo, elements, format, get, get, getBoolean, getChar, getDouble, getFloat, getInteger, getLong, getObject, getPos, getShort, getString, getTypes, internalSet, isEmpty, isUnmodifiable, iterator, leave, printTo, put, remove, remove, set, set, set, setAll, setAll, setBoolean, setDouble, setFloat, setInteger, setLong, setShort, setString, 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

#### tuples

    public static Tuple[] tuples(TuplePair tuplePair)

Returns a reference to the private tuples of the given TuplePark

Parameters:
  `tuplePair` - of type Tuple[]
Returns:
  Tuple[]

#### 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.

#### reset

    public void reset(Tuple lhs,
             Tuple rhs)

Specified by:
  `reset` in interface `Resettable2<Tuple,Tuple>`

#### equals

    public boolean equals(java.lang.Object object)

Overrides:
  `equals` in class `Tuple`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Tuple`

#### compareTo

    public int compareTo(java.lang.Object other)

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

Specified by:
  `compareTo` in interface `java.lang.Comparable<java.lang.Object>`
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 java.lang.String toString()

Overrides:
  `toString` in class `Tuple`

#### print

    public java.lang.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