本文整理汇总了Java中com.espertech.esper.epl.datetime.eval.DatetimeLongCoercerFactory类的典型用法代码示例。如果您正苦于以下问题:Java DatetimeLongCoercerFactory类的具体用法?Java DatetimeLongCoercerFactory怎么用?Java DatetimeLongCoercerFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DatetimeLongCoercerFactory类属于com.espertech.esper.epl.datetime.eval包,在下文中一共展示了DatetimeLongCoercerFactory类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ReformatBetweenNonConstantParamsForge
import com.espertech.esper.epl.datetime.eval.DatetimeLongCoercerFactory; //导入依赖的package包/类
public ReformatBetweenNonConstantParamsForge(List<ExprNode> parameters, TimeZone timeZone)
throws ExprValidationException {
this.timeZone = timeZone;
start = parameters.get(0);
startCoercer = DatetimeLongCoercerFactory.getCoercer(start.getForge().getEvaluationType(), timeZone);
end = parameters.get(1);
secondCoercer = DatetimeLongCoercerFactory.getCoercer(end.getForge().getEvaluationType(), timeZone);
if (parameters.size() == 2) {
includeBoth = true;
includeLow = true;
includeHigh = true;
} else {
if (parameters.get(2).isConstantResult()) {
includeLow = getBooleanValue(parameters.get(2));
} else {
forgeIncludeLow = parameters.get(2).getForge();
}
if (parameters.get(3).isConstantResult()) {
includeHigh = getBooleanValue(parameters.get(3));
} else {
forgeIncludeHigh = parameters.get(3).getForge();
}
if (includeLow != null && includeHigh != null && includeLow && includeHigh) {
includeBoth = true;
}
}
}
示例2: getLongValue
import com.espertech.esper.epl.datetime.eval.DatetimeLongCoercerFactory; //导入依赖的package包/类
private long getLongValue(ExprNode exprNode)
throws ExprValidationException
{
Object value = exprNode.getExprEvaluator().evaluate(null, true, null);
if (value == null) {
throw new ExprValidationException("Date-time method 'between' requires non-null parameter values");
}
return DatetimeLongCoercerFactory.getCoercer(value.getClass()).coerce(value);
}