public class RangePredicate extends BinaryExpression implements Predicate
| Modifier and Type | Field and Description |
|---|---|
static int |
EX_EX
Indicates the both the left and right bounds are exclusive
|
static int |
EX_IN
Indicates an exclusive left bound and inclusive right bound
|
static int |
IN_EX
Indicates an inclusive left bound and exclusive right bound
|
static int |
IN_IN
Indicates the both the left and right bounds are inclusive
|
m_left, m_op, m_right| Constructor and Description |
|---|
RangePredicate(Expression middle,
Expression left,
Expression right)
Create a new RangePredicate.
|
RangePredicate(Expression middle,
Expression left,
Expression right,
java.util.Comparator cmp)
Create a new RangePredicate.
|
RangePredicate(int operation,
Expression middle,
Expression left,
Expression right)
Create a new RangePredicate.
|
RangePredicate(int operation,
Expression middle,
Expression left,
Expression right,
java.util.Comparator cmp)
Create a new RangePredicate.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addChildListeners()
Add child listeners to catch and propagate sub-expression updates.
|
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 data values.
|
Expression |
getMiddleExpression()
Get the middle expression being tested for inclusion in the range
|
java.lang.Class |
getType(Schema s)
Returns the type that this expression evaluates to when tuples
with the given Schema are provided as input.
|
protected void |
removeChildListeners()
Remove child listeners for sub-expression updates.
|
java.lang.String |
toString() |
void |
visit(ExpressionVisitor v)
Passes the visitor through this expression and any sub expressions
|
getLeftExpression, getOperation, getRightExpression, setLeftExpression, setRightExpressionaddExpressionListener, expressionChanged, fireExpressionChange, getDouble, getFloat, getInt, getLong, hasListeners, removeExpressionListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddExpressionListener, getDouble, getFloat, getInt, getLong, removeExpressionListenerpublic static final int IN_IN
public static final int IN_EX
public static final int EX_IN
public static final int EX_EX
public RangePredicate(Expression middle, Expression left, Expression right)
middle - the value to test for membership in the rangeleft - the lower range boundright - the upper range boundpublic RangePredicate(Expression middle, Expression left, Expression right, java.util.Comparator cmp)
middle - the value to test for membership in the rangeleft - the lower range boundright - the upper range boundcmp - the comparator to use for comparing data valuespublic RangePredicate(int operation,
Expression middle,
Expression left,
Expression right)
operation - operation code indicating the inclusiveness /
exclusiveness of the boundsmiddle - the value to test for membership in the rangeleft - the lower range boundright - the upper range boundpublic RangePredicate(int operation,
Expression middle,
Expression left,
Expression right,
java.util.Comparator cmp)
operation - operation code indicating the inclusiveness /
exclusiveness of the boundsmiddle - the value to test for membership in the rangeleft - the lower range boundright - the upper range boundcmp - the comparator to use for comparing data valuespublic Expression getMiddleExpression()
public java.util.Comparator getComparator()
public boolean getBoolean(Tuple t)
AbstractExpressiongetBoolean in interface ExpressiongetBoolean in class AbstractExpressiont - the input TupleExpression.getBoolean(prefuse.data.Tuple)public java.lang.Class getType(Schema s)
ExpressiongetType in interface ExpressionExpression.getType(prefuse.data.Schema)public java.lang.Object get(Tuple t)
AbstractExpressionget in interface Expressionget in class AbstractExpressiont - the input TupleExpression.get(prefuse.data.Tuple)public void visit(ExpressionVisitor v)
Expressionvisit in interface Expressionvisit in class BinaryExpressionv - the ExpressionVisitorExpression.visit(prefuse.data.expression.ExpressionVisitor)protected void addChildListeners()
AbstractExpressionaddChildListeners in class BinaryExpressionAbstractExpression.addChildListeners()protected void removeChildListeners()
AbstractExpressionremoveChildListeners in class BinaryExpressionAbstractExpression.removeChildListeners()public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()