|
||||||||||
| 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 constant| Method Detail |
|---|
public 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(Scan s)
evaluate in interface Expressions - the scan
Expression.evaluate(simpledb.query.Scan)public boolean appliesTo(Schema sch)
appliesTo in interface Expressionsch - 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 | |||||||||