|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectprefuse.data.expression.AbstractExpression
prefuse.data.expression.BinaryExpression
prefuse.data.expression.ComparisonPredicate
public class ComparisonPredicate
Predicate implementation that computes a comparison operation. Supported operations are equals, not equals, less than, greater than, less than or equal to, and greater than or equal to.
| Field Summary | |
|---|---|
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. |
| Fields inherited from class prefuse.data.expression.BinaryExpression |
|---|
m_left, m_op, m_right |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class prefuse.data.expression.BinaryExpression |
|---|
addChildListeners, getLeftExpression, getOperation, getRightExpression, removeChildListeners, setLeftExpression, setRightExpression, visit |
| Methods inherited from class prefuse.data.expression.AbstractExpression |
|---|
addExpressionListener, expressionChanged, fireExpressionChange, getDouble, getFloat, getInt, getLong, hasListeners, removeExpressionListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface prefuse.data.expression.Expression |
|---|
addExpressionListener, getDouble, getFloat, getInt, getLong, removeExpressionListener, visit |
| Field Detail |
|---|
public 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
| Constructor Detail |
|---|
public ComparisonPredicate(int operation,
Expression left,
Expression right)
operation - the comparison operation to computeleft - the left sub-expressionright - the right sub-expression
public 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 values| Method Detail |
|---|
public java.util.Comparator getComparator()
public java.lang.Class getType(Schema s)
Expression
getType in interface ExpressionExpression.getType(prefuse.data.Schema)public boolean getBoolean(Tuple t)
AbstractExpression
getBoolean in interface ExpressiongetBoolean in class AbstractExpressiont - the input Tuple
Expression.getBoolean(prefuse.data.Tuple)public java.lang.Object get(Tuple t)
AbstractExpression
get in interface Expressionget in class AbstractExpressiont - the input Tuple
Expression.get(prefuse.data.Tuple)public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||