public class FieldComparator extends Object implements StreamComparator
Constructor and Description |
---|
FieldComparator(String fieldName,
ComparatorOrder order) |
FieldComparator(String leftFieldName,
String rightFieldName,
ComparatorOrder order) |
Modifier and Type | Method and Description |
---|---|
StreamComparator |
append(StreamComparator other) |
int |
compare(Tuple leftTuple,
Tuple rightTuple) |
FieldComparator |
copyAliased(Map<String,String> aliases) |
String |
getLeftFieldName() |
ComparatorOrder |
getOrder() |
String |
getRightFieldName() |
boolean |
hasDifferentFieldNames() |
boolean |
isDerivedFrom(StreamComparator base) |
void |
setLeftFieldName(String leftFieldName) |
void |
setRightFieldName(String rightFieldName) |
Explanation |
toExplanation(StreamFactory factory)
Returns an explanation about the stream object
|
StreamExpressionParameter |
toExpression(StreamFactory factory) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public FieldComparator(String fieldName, ComparatorOrder order)
public FieldComparator(String leftFieldName, String rightFieldName, ComparatorOrder order)
public void setLeftFieldName(String leftFieldName)
public String getLeftFieldName()
public void setRightFieldName(String rightFieldName)
public String getRightFieldName()
public ComparatorOrder getOrder()
public boolean hasDifferentFieldNames()
public StreamExpressionParameter toExpression(StreamFactory factory)
toExpression
in interface Expressible
public Explanation toExplanation(StreamFactory factory) throws IOException
Expressible
toExplanation
in interface Expressible
factory
- Stream factory for this, contains information about the function nameIOException
- throw on any errorpublic int compare(Tuple leftTuple, Tuple rightTuple)
compare
in interface Comparator<Tuple>
public boolean isDerivedFrom(StreamComparator base)
isDerivedFrom
in interface StreamComparator
public FieldComparator copyAliased(Map<String,String> aliases)
copyAliased
in interface StreamComparator
public StreamComparator append(StreamComparator other)
append
in interface StreamComparator
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.