public class Term extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Term.Operator |
Modifier and Type | Field and Description |
---|---|
static Term.Operator |
OP_EQ |
static Term.Operator |
OP_GT |
static Term.Operator |
OP_GTE |
static Term.Operator |
OP_LT |
static Term.Operator |
OP_LTE |
Constructor and Description |
---|
Term(Expression lhs,
Term.Operator op,
Expression rhs) |
Modifier and Type | Method and Description |
---|---|
boolean |
isApplicableTo(Schema sch)
Returns true if both expressions of this term apply to the specified
schema.
|
boolean |
isSatisfied(Record rec)
Returns true if, given the specified record, the two expressions evaluate
to matching values.
|
Term.Operator |
operator(String fldName)
Determines if this term is of the form "F<OP>E" where F is the
specified field, <OP> is an operator, and E is an expression.
|
Constant |
oppositeConstant(String fldName)
Determines if this term is of the form "F<OP>C" where F is the
specified field, <OP> is an operator, and C is some constant.
|
String |
oppositeField(String fldName)
Determines if this term is of the form "F1<OP>F2" where F1 is the
specified field, <OP> is an operator, and F2 is another field.
|
String |
toString() |
public static final Term.Operator OP_EQ
public static final Term.Operator OP_LT
public static final Term.Operator OP_LTE
public static final Term.Operator OP_GT
public static final Term.Operator OP_GTE
public Term(Expression lhs, Term.Operator op, Expression rhs)
public Term.Operator operator(String fldName)
fldName
- the name of the fieldpublic Constant oppositeConstant(String fldName)
fldName
- the name of the fieldpublic String oppositeField(String fldName)
fldName
- the name of F1public boolean isApplicableTo(Schema sch)
sch
- the schemapublic boolean isSatisfied(Record rec)
rec
- the recordCopyright © 2022 VanillaDB Organization. All rights reserved.