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, setRightExpression
addExpressionListener, expressionChanged, fireExpressionChange, getDouble, getFloat, getInt, getLong, hasListeners, removeExpressionListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addExpressionListener, getDouble, getFloat, getInt, getLong, removeExpressionListener
public 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)
AbstractExpression
getBoolean
in interface Expression
getBoolean
in class AbstractExpression
t
- the input TupleExpression.getBoolean(prefuse.data.Tuple)
public java.lang.Class getType(Schema s)
Expression
getType
in interface Expression
Expression.getType(prefuse.data.Schema)
public java.lang.Object get(Tuple t)
AbstractExpression
get
in interface Expression
get
in class AbstractExpression
t
- the input TupleExpression.get(prefuse.data.Tuple)
public void visit(ExpressionVisitor v)
Expression
visit
in interface Expression
visit
in class BinaryExpression
v
- the ExpressionVisitorExpression.visit(prefuse.data.expression.ExpressionVisitor)
protected void addChildListeners()
AbstractExpression
addChildListeners
in class BinaryExpression
AbstractExpression.addChildListeners()
protected void removeChildListeners()
AbstractExpression
removeChildListeners
in class BinaryExpression
AbstractExpression.removeChildListeners()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
Copyright ? 2013 Regents of the University of California