public class Predicate
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Predicate.Op
Constants used for return codes in Field.compare
|
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
Constructor and Description |
---|
Predicate(int field,
Predicate.Op op,
Field operand)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
filter(Tuple t)
Compares the field number of t specified in the constructor to the
operand field specified in the constructor using the operator specific in
the constructor.
|
int |
getField() |
Predicate.Op |
getOp() |
Field |
getOperand() |
java.lang.String |
toString()
Returns something useful, like "f = field_id op = op_string operand =
operand_string
|
private static final long serialVersionUID
public Predicate(int field, Predicate.Op op, Field operand)
field
- field number of passed in tuples to compare against.op
- operation to use for comparisonoperand
- field value to compare passed in tuples topublic int getField()
public Predicate.Op getOp()
public Field getOperand()
public boolean filter(Tuple t)
t
- The tuple to compare againstpublic java.lang.String toString()
toString
in class java.lang.Object