cascading.tuple.util
Class TupleHasher
java.lang.Object
cascading.tuple.util.TupleHasher
- All Implemented Interfaces:
- Serializable
public class TupleHasher
- extends Object
- implements Serializable
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
hashFunction
protected TupleHasher.HashFunction hashFunction
TupleHasher
public TupleHasher()
TupleHasher
public TupleHasher(Comparator defaultComparator,
Comparator[] comparators)
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)
getHashFunction
protected TupleHasher.HashFunction getHashFunction()
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 Hasher
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-2015 Concurrent, Inc. All Rights Reserved.