cascading.tuple.util
Class TupleHasher

java.lang.Object
  extended by cascading.tuple.util.TupleHasher
All Implemented Interfaces:
Serializable

public class TupleHasher
extends Object
implements Serializable

See Also:
Serialized Form

Constructor Summary
TupleHasher()
           
TupleHasher(Comparator defaultComparator, Comparator[] comparators)
           
 
Method Summary
 int hashCode(Tuple tuple)
           
protected  void initialize(Comparator defaultComparator, Comparator[] comparators)
           
static boolean isNull(Comparator[] comparators)
           
static Comparator[] merge(Fields[] keyFields)
           
static Tuple wrapTuple(TupleHasher tupleHasher, Tuple input)
          Wraps the given Tuple in a subtype, that uses the provided Hasher for hashCode calculations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TupleHasher

public TupleHasher()

TupleHasher

public TupleHasher(Comparator defaultComparator,
                   Comparator[] comparators)
Method Detail

merge

public static Comparator[] merge(Fields[] keyFields)

isNull

public static boolean isNull(Comparator[] comparators)

initialize

protected void initialize(Comparator defaultComparator,
                          Comparator[] comparators)

hashCode

public final int hashCode(Tuple tuple)

wrapTuple

public static Tuple wrapTuple(TupleHasher tupleHasher,
                              Tuple input)
Wraps the given Tuple in a subtype, that uses the provided Hasher for hashCode calculations. If the given Hahser is null the input Tuple will be returned.

Parameters:
tupleHasher - A TupleHasher instance.
input - A Tuple instance.
Returns:
A tuple using the provided TupleHasher for hashCode calculations if the TupleHasher is not null.


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