public class FieldNameExpression extends Object implements Expression
| Constructor and Description |
|---|
FieldNameExpression(String fldName)
Creates a new expression by wrapping a field.
|
| Modifier and Type | Method and Description |
|---|---|
Constant |
asConstant()
This method should never be called.
|
String |
asFieldName()
Unwraps the field name and returns it.
|
Constant |
evaluate(Record rec)
Evaluates the field by getting its value from the record.
|
boolean |
isApplicableTo(Schema sch)
Returns true if the field is in the specified schema.
|
boolean |
isConstant()
Returns false.
|
boolean |
isFieldName()
Returns true.
|
String |
toString() |
public FieldNameExpression(String fldName)
fldName - the name of the wrapped fieldpublic boolean isConstant()
isConstant in interface ExpressionExpression.isConstant()public boolean isFieldName()
isFieldName in interface ExpressionExpression.isFieldName()public Constant asConstant()
asConstant in interface ExpressionExpression.asConstant()public String asFieldName()
asFieldName in interface ExpressionExpression.asFieldName()public Constant evaluate(Record rec)
evaluate in interface Expressionrec - the recordExpression.evaluate(Record)public boolean isApplicableTo(Schema sch)
isApplicableTo in interface Expressionsch - the schemaExpression.isApplicableTo(Schema)Copyright © 2022 VanillaDB Organization. All rights reserved.