|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.epl.expression.core.ExprNodeBase
com.espertech.esper.epl.expression.time.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 | |
---|---|
ExprTimePeriodEvalDeltaConst |
constEvaluator(ExprEvaluatorContext context)
|
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 context)
Evaluate event tuple and return result. |
double |
evaluateAsSeconds(EventBean[] eventsPerStream,
boolean newData,
ExprEvaluatorContext context)
|
TimePeriod |
evaluateGetTimePeriod(EventBean[] eventsPerStream,
boolean newData,
ExprEvaluatorContext context)
|
protected ExprTimePeriodImpl.TimePeriodAdder[] |
getAdders()
|
ExprEvaluator[] |
getEvaluators()
|
ExprEvaluator |
getExprEvaluator()
|
ExprPrecedenceEnum |
getPrecedence()
Returns precedence. |
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. |
ExprTimePeriodEvalDeltaNonConst |
nonconstEvaluator()
|
void |
toPrecedenceFreeEPL(java.io.StringWriter writer)
|
ExprNode |
validate(ExprValidationContext validationContext)
|
Methods inherited from class com.espertech.esper.epl.expression.core.ExprNodeBase |
---|
accept, accept, acceptChildnodes, addChildNode, addChildNodes, addChildNodeToFront, getChildNodes, replaceUnlistedChildNode, setChildNode, setChildNodes, toEPL |
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.core.ExprNode |
---|
accept, accept, acceptChildnodes, addChildNode, addChildNodes, getChildNodes, replaceUnlistedChildNode, setChildNode, setChildNodes, toEPL |
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 ExprTimePeriodEvalDeltaConst constEvaluator(ExprEvaluatorContext context)
constEvaluator
in interface ExprTimePeriod
public ExprTimePeriodEvalDeltaNonConst nonconstEvaluator()
nonconstEvaluator
in interface ExprTimePeriod
public ExprEvaluator getExprEvaluator()
getExprEvaluator
in interface ExprNode
public java.lang.Object evaluate(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context)
ExprEvaluator
evaluate
in interface ExprEvaluator
eventsPerStream
- - event tupleisNewData
- - indicates whether we are dealing with new data (istream) or old data (rstream)context
- context for expression evaluation
protected ExprTimePeriodImpl.TimePeriodAdder[] getAdders()
public ExprEvaluator[] getEvaluators()
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 ExprNode validate(ExprValidationContext validationContext) throws ExprValidationException
validate
in interface ExprValidator
ExprValidationException
public double evaluateAsSeconds(EventBean[] eventsPerStream, boolean newData, ExprEvaluatorContext context)
evaluateAsSeconds
in interface ExprTimePeriod
public TimePeriod evaluateGetTimePeriod(EventBean[] eventsPerStream, boolean newData, ExprEvaluatorContext context)
evaluateGetTimePeriod
in interface ExprTimePeriod
public java.lang.Class getType()
ExprEvaluator
getType
in interface ExprEvaluator
public boolean isConstantResult()
ExprNode
isConstantResult
in interface ExprNode
isConstantResult
in interface ExprTimePeriod
public void toPrecedenceFreeEPL(java.io.StringWriter writer)
toPrecedenceFreeEPL
in class ExprNodeBase
public ExprPrecedenceEnum getPrecedence()
ExprNode
getPrecedence
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
|
© 2006-2015 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 |