public class ExprTimePeriodImpl extends ExprNodeBase implements ExprTimePeriod
Child nodes to this expression carry the actual parts and must return a numeric value.
Constructor and Description |
---|
ExprTimePeriodImpl(TimeZone timeZone,
boolean hasYear,
boolean hasMonth,
boolean hasWeek,
boolean hasDay,
boolean hasHour,
boolean hasMinute,
boolean hasSecond,
boolean hasMillisecond,
boolean hasMicrosecond,
TimeAbacus timeAbacus) |
Modifier and Type | Method and Description |
---|---|
ExprTimePeriodEvalDeltaConst |
constEvaluator(ExprEvaluatorContext context) |
boolean |
equalsNode(ExprNode node,
boolean ignoreStreamPrefix)
Return true if a expression node semantically equals the current node, or false if not.
|
double |
evaluateAsSeconds(EventBean[] eventsPerStream,
boolean newData,
ExprEvaluatorContext context) |
CodegenExpression |
evaluateAsSecondsCodegen(CodegenParamSetExprPremade params,
CodegenContext context) |
TimePeriod |
evaluateGetTimePeriod(EventBean[] eventsPerStream,
boolean newData,
ExprEvaluatorContext context) |
CodegenExpression |
evaluateGetTimePeriodCodegen(CodegenParamSetExprPremade params,
CodegenContext context) |
ExprEvaluator |
getExprEvaluator() |
ExprForge |
getForge() |
ExprPrecedenceEnum |
getPrecedence()
Returns precedence.
|
TimeAbacus |
getTimeAbacus() |
TimeZone |
getTimeZone() |
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 |
isHasMicrosecond()
Indicator whether the time period has a microsecond 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(StringWriter writer) |
ExprNode |
validate(ExprValidationContext validationContext) |
accept, accept, acceptChildnodes, addChildNode, addChildNodes, addChildNodeToFront, getChildNodes, replaceUnlistedChildNode, setChildNode, setChildNodes, toEPL
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accept, accept, acceptChildnodes, addChildNode, addChildNodes, getChildNodes, replaceUnlistedChildNode, setChildNode, setChildNodes
toEPL
public ExprTimePeriodImpl(TimeZone timeZone, boolean hasYear, boolean hasMonth, boolean hasWeek, boolean hasDay, boolean hasHour, boolean hasMinute, boolean hasSecond, boolean hasMillisecond, boolean hasMicrosecond, TimeAbacus timeAbacus)
public ExprEvaluator getExprEvaluator()
public ExprTimePeriodEvalDeltaConst constEvaluator(ExprEvaluatorContext context)
constEvaluator
in interface ExprTimePeriod
public ExprTimePeriodEvalDeltaNonConst nonconstEvaluator()
nonconstEvaluator
in interface ExprTimePeriod
public CodegenExpression evaluateGetTimePeriodCodegen(CodegenParamSetExprPremade params, CodegenContext context)
evaluateGetTimePeriodCodegen
in interface ExprTimePeriod
public CodegenExpression evaluateAsSecondsCodegen(CodegenParamSetExprPremade params, CodegenContext context)
evaluateAsSecondsCodegen
in interface ExprTimePeriod
public boolean hasVariable()
hasVariable
in interface ExprTimePeriod
public TimePeriod evaluateGetTimePeriod(EventBean[] eventsPerStream, boolean newData, ExprEvaluatorContext context)
evaluateGetTimePeriod
in interface ExprTimePeriod
public double evaluateAsSeconds(EventBean[] eventsPerStream, boolean newData, ExprEvaluatorContext context)
evaluateAsSeconds
in interface ExprTimePeriod
public TimeAbacus getTimeAbacus()
public TimeZone getTimeZone()
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 isHasMicrosecond()
ExprTimePeriod
isHasMicrosecond
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 ExprNode validate(ExprValidationContext validationContext) throws ExprValidationException
validate
in interface ExprValidator
ExprValidationException
public boolean isConstantResult()
ExprNode
isConstantResult
in interface ExprNode
isConstantResult
in interface ExprTimePeriod
public void toPrecedenceFreeEPL(StringWriter writer)
toPrecedenceFreeEPL
in class ExprNodeBase
public ExprPrecedenceEnum getPrecedence()
ExprNode
getPrecedence
in interface ExprNode
public boolean equalsNode(ExprNode node, boolean ignoreStreamPrefix)
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 toignoreStreamPrefix
- when the equals-comparison can ignore prefix of event properties