public class ComparisonPredicate extends BinaryExpression implements Predicate
| Modifier and Type | Field and Description |
|---|---|
static int |
EQ
Indicates a equals comparison.
|
static int |
GT
Indicates a greater-than comparison.
|
static int |
GTEQ
Indicates a greater-than-or-equals comparison.
|
static int |
LT
Indicates a less-than comparison.
|
static int |
LTEQ
Indicates a less-than-or-equals comparison.
|
static int |
NEQ
Indicates a not-equals comparison.
|
m_left, m_op, m_right| Constructor and Description |
|---|
ComparisonPredicate(int operation,
Expression left,
Expression right)
Create a new ComparisonPredicate.
|
ComparisonPredicate(int operation,
Expression left,
Expression right,
java.util.Comparator cmp)
Create a new ComparisonPredicate.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
get(Tuple t)
By default, throws an UnsupportedOperationException.
|
boolean |
getBoolean(Tuple t)
By default, throws an UnsupportedOperationException.
|
java.util.Comparator |
getComparator()
Get the comparator used to compare instances.
|
java.lang.Class |
getType(Schema s)
Returns the type that this expression evaluates to when tuples
with the given Schema are provided as input.
|
java.lang.String |
toString() |
addChildListeners, getLeftExpression, getOperation, getRightExpression, removeChildListeners, setLeftExpression, setRightExpression, visitaddExpressionListener, expressionChanged, fireExpressionChange, getDouble, getFloat, getInt, getLong, hasListeners, removeExpressionListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddExpressionListener, getDouble, getFloat, getInt, getLong, removeExpressionListener, visitpublic static final int LT
public static final int GT
public static final int EQ
public static final int NEQ
public static final int LTEQ
public static final int GTEQ
public ComparisonPredicate(int operation,
Expression left,
Expression right)
operation - the comparison operation to computeleft - the left sub-expressionright - the right sub-expressionpublic ComparisonPredicate(int operation,
Expression left,
Expression right,
java.util.Comparator cmp)
operation - the comparison operation to computeleft - the left sub-expressionright - the right sub-expressioncmp - the comparator to use to compare valuespublic java.util.Comparator getComparator()
public java.lang.Class getType(Schema s)
ExpressiongetType in interface ExpressionExpression.getType(prefuse.data.Schema)public boolean getBoolean(Tuple t)
AbstractExpressiongetBoolean in interface ExpressiongetBoolean in class AbstractExpressiont - the input TupleExpression.getBoolean(prefuse.data.Tuple)public java.lang.Object get(Tuple t)
AbstractExpressionget in interface Expressionget in class AbstractExpressiont - the input TupleExpression.get(prefuse.data.Tuple)public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()