public class TupleComparator extends Object implements Comparator<Tuple>, ProtoObject<IndexProtos.TupleComparatorProto>
Tuple
Constructor and Description |
---|
TupleComparator(IndexProtos.TupleComparatorProto proto) |
TupleComparator(Schema schema,
SortSpec[] sortKeys) |
Modifier and Type | Method and Description |
---|---|
int |
compare(Tuple tuple1,
Tuple tuple2) |
boolean |
equals(Object obj) |
IndexProtos.TupleComparatorProto |
getProto() |
int |
hashCode() |
boolean |
isAscendingFirstKey() |
public TupleComparator(Schema schema, SortSpec[] sortKeys)
schema
- The schema of input tuplessortKeys
- The description of sort keyspublic TupleComparator(IndexProtos.TupleComparatorProto proto)
public boolean isAscendingFirstKey()
public int compare(Tuple tuple1, Tuple tuple2)
compare
in interface Comparator<Tuple>
public boolean equals(Object obj)
equals
in interface Comparator<Tuple>
equals
in class Object
public IndexProtos.TupleComparatorProto getProto()
getProto
in interface ProtoObject<IndexProtos.TupleComparatorProto>
Copyright © 2014 Apache Software Foundation. All Rights Reserved.