|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimpledb.query.ConstantExpression
public class ConstantExpression
An expression consisting entirely of a single constant.
Constructor Summary | |
---|---|
ConstantExpression(Constant c)
Creates a new expression by wrapping a constant. |
Method Summary | |
---|---|
boolean |
appliesTo(Schema sch)
Returns true, because a constant applies to any schema. |
Constant |
asConstant()
Unwraps the constant and returns it. |
String |
asFieldName()
This method should never be called. |
Constant |
evaluate(Scan s)
Returns the constant, regardless of the scan. |
boolean |
isConstant()
Returns true. |
boolean |
isFieldName()
Returns false. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConstantExpression(Constant c)
c
- the constantMethod Detail |
---|
public 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(Scan s)
evaluate
in interface Expression
s
- the scan
Expression.evaluate(simpledb.query.Scan)
public boolean appliesTo(Schema sch)
appliesTo
in interface Expression
sch
- the schema
Expression.appliesTo(simpledb.record.Schema)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |