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 Expression
Expression.isConstant()
public boolean isFieldName()
isFieldName
in interface Expression
Expression.isFieldName()
public Constant asConstant()
asConstant
in interface Expression
Expression.asConstant()
public String asFieldName()
asFieldName
in interface Expression
Expression.asFieldName()
public Constant evaluate(Record rec)
evaluate
in interface Expression
rec
- the recordExpression.evaluate(Record)
public boolean isApplicableTo(Schema sch)
isApplicableTo
in interface Expression
sch
- the schemaExpression.isApplicableTo(Schema)
Copyright © 2022 VanillaDB Organization. All rights reserved.