|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.epl.expression.ExprNodeBase
com.espertech.esper.epl.expression.ExprTimePeriodImpl
public class ExprTimePeriodImpl
Expression representing a time period.
Child nodes to this expression carry the actual parts and must return a numeric value.
Nested Class Summary | |
---|---|
static interface |
ExprTimePeriodImpl.TimePeriodAdder
|
static class |
ExprTimePeriodImpl.TimePeriodAdderDay
|
static class |
ExprTimePeriodImpl.TimePeriodAdderHour
|
static class |
ExprTimePeriodImpl.TimePeriodAdderMinute
|
static class |
ExprTimePeriodImpl.TimePeriodAdderMonth
|
static class |
ExprTimePeriodImpl.TimePeriodAdderMSec
|
static class |
ExprTimePeriodImpl.TimePeriodAdderSecond
|
static class |
ExprTimePeriodImpl.TimePeriodAdderWeek
|
static class |
ExprTimePeriodImpl.TimePeriodAdderYear
|
Constructor Summary | |
---|---|
ExprTimePeriodImpl(boolean hasYear,
boolean hasMonth,
boolean hasWeek,
boolean hasDay,
boolean hasHour,
boolean hasMinute,
boolean hasSecond,
boolean hasMillisecond)
Ctor. |
Method Summary | |
---|---|
boolean |
equalsNode(ExprNode node)
Return true if a expression node semantically equals the current node, or false if not. |
java.lang.Object |
evaluate(EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext exprEvaluatorContext)
Evaluate event tuple and return result. |
TimePeriod |
evaluateGetTimePeriod(EventBean[] eventsPerStream,
boolean newData,
ExprEvaluatorContext context)
|
ExprEvaluator |
getExprEvaluator()
|
java.lang.Class |
getType()
Returns the type that the node's evaluate method returns an instance of. |
boolean |
hasVariable()
Indicator whether the time period has a variable in any of the child expressions. |
boolean |
isConstantResult()
Returns true if the expression node's evaluation value doesn't depend on any events data, as must be determined at validation time, which is bottom-up and therefore reliably allows each node to determine constant value. |
boolean |
isHasDay()
Indicator whether the time period has a day part child expression. |
boolean |
isHasHour()
Indicator whether the time period has a hour part child expression. |
boolean |
isHasMillisecond()
Indicator whether the time period has a millisecond part child expression. |
boolean |
isHasMinute()
Indicator whether the time period has a minute part child expression. |
boolean |
isHasMonth()
Indicator whether the time period has a month part child expression. |
boolean |
isHasSecond()
Indicator whether the time period has a second part child expression. |
boolean |
isHasWeek()
Indicator whether the time period has a week part child expression. |
boolean |
isHasYear()
Indicator whether the time period has a year part child expression. |
java.lang.String |
toExpressionString()
Returns the expression node rendered as a string. |
void |
validate(ExprValidationContext validationContext)
|
Methods inherited from class com.espertech.esper.epl.expression.ExprNodeBase |
---|
accept, accept, acceptChildnodes, addChildNode, addChildNodes, addChildNodeToFront, getChildNodes, replaceUnlistedChildNode, setChildNode, setChildNodes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.espertech.esper.epl.expression.ExprNode |
---|
accept, accept, acceptChildnodes, addChildNode, addChildNodes, getChildNodes, replaceUnlistedChildNode, setChildNode, setChildNodes |
Constructor Detail |
---|
public ExprTimePeriodImpl(boolean hasYear, boolean hasMonth, boolean hasWeek, boolean hasDay, boolean hasHour, boolean hasMinute, boolean hasSecond, boolean hasMillisecond)
hasDay
- true if the expression has that part, false if nothasHour
- true if the expression has that part, false if nothasMinute
- true if the expression has that part, false if nothasSecond
- true if the expression has that part, false if nothasMillisecond
- true if the expression has that part, false if notMethod Detail |
---|
public ExprEvaluator getExprEvaluator()
getExprEvaluator
in interface ExprNode
public boolean isHasDay()
isHasDay
in interface ExprTimePeriod
public boolean isHasHour()
isHasHour
in interface ExprTimePeriod
public boolean isHasMinute()
isHasMinute
in interface ExprTimePeriod
public boolean isHasSecond()
isHasSecond
in interface ExprTimePeriod
public boolean isHasMillisecond()
isHasMillisecond
in interface ExprTimePeriod
public boolean isHasYear()
isHasYear
in interface ExprTimePeriod
public boolean isHasMonth()
isHasMonth
in interface ExprTimePeriod
public boolean isHasWeek()
isHasWeek
in interface ExprTimePeriod
public boolean hasVariable()
hasVariable
in interface ExprTimePeriod
public void validate(ExprValidationContext validationContext) throws ExprValidationException
validate
in interface ExprValidator
ExprValidationException
public java.lang.Object evaluate(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext)
ExprEvaluator
evaluate
in interface ExprEvaluator
eventsPerStream
- - event tupleisNewData
- - indicates whether we are dealing with new data (istream) or old data (rstream)exprEvaluatorContext
- context for expression evaluation
public java.lang.Class getType()
ExprEvaluator
getType
in interface ExprEvaluator
public boolean isConstantResult()
ExprNode
isConstantResult
in interface ExprNode
isConstantResult
in interface ExprTimePeriod
public java.lang.String toExpressionString()
ExprNode
toExpressionString
in interface ExprNode
public boolean equalsNode(ExprNode node)
ExprNode
Concrete implementations should compare the type and any additional information that impact the evaluation of a node.
equalsNode
in interface ExprNode
node
- to compare to
public TimePeriod evaluateGetTimePeriod(EventBean[] eventsPerStream, boolean newData, ExprEvaluatorContext context)
evaluateGetTimePeriod
in interface ExprTimePeriod
|
© 2006-2014 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |