本文整理汇总了Java中com.espertech.esper.util.SimpleNumberCoercerFactory.getCoercerBigDecimal方法的典型用法代码示例。如果您正苦于以下问题:Java SimpleNumberCoercerFactory.getCoercerBigDecimal方法的具体用法?Java SimpleNumberCoercerFactory.getCoercerBigDecimal怎么用?Java SimpleNumberCoercerFactory.getCoercerBigDecimal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.espertech.esper.util.SimpleNumberCoercerFactory
的用法示例。
在下文中一共展示了SimpleNumberCoercerFactory.getCoercerBigDecimal方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ExprBetweenCompBigDecimal
import com.espertech.esper.util.SimpleNumberCoercerFactory; //导入方法依赖的package包/类
public ExprBetweenCompBigDecimal(boolean lowIncluded, boolean highIncluded, Class valueType, Class lowerType, Class upperType) {
isLowIncluded = lowIncluded;
isHighIncluded = highIncluded;
numberCoercerLower = SimpleNumberCoercerFactory.getCoercerBigDecimal(lowerType);
numberCoercerUpper = SimpleNumberCoercerFactory.getCoercerBigDecimal(upperType);
numberCoercerValue = SimpleNumberCoercerFactory.getCoercerBigDecimal(valueType);
}
示例2: makeBigDecimalComputer
import com.espertech.esper.util.SimpleNumberCoercerFactory; //导入方法依赖的package包/类
private Computer makeBigDecimalComputer(Class typeOne, Class typeTwo, boolean divisionByZeroReturnsNull, MathContext optionalMathContext) {
if ((typeOne == BigDecimal.class) && (typeTwo == BigDecimal.class)) {
if (this == DIVIDE) {
if (optionalMathContext != null) {
return new DivideBigDecWMathContext(divisionByZeroReturnsNull, optionalMathContext);
}
return new DivideBigDec(divisionByZeroReturnsNull);
}
return computers.get(new MultiKeyUntyped(new Object[]{BigDecimal.class, this}));
}
SimpleNumberBigDecimalCoercer convertorOne = SimpleNumberCoercerFactory.getCoercerBigDecimal(typeOne);
SimpleNumberBigDecimalCoercer convertorTwo = SimpleNumberCoercerFactory.getCoercerBigDecimal(typeTwo);
if (this == ADD) {
return new AddBigDecConvComputer(convertorOne, convertorTwo);
}
if (this == SUBTRACT) {
return new SubtractBigDecConvComputer(convertorOne, convertorTwo);
}
if (this == MULTIPLY) {
return new MultiplyBigDecConvComputer(convertorOne, convertorTwo);
}
if (this == DIVIDE) {
if (optionalMathContext == null) {
return new DivideBigDecConvComputerNoMathCtx(convertorOne, convertorTwo, divisionByZeroReturnsNull);
}
return new DivideBigDecConvComputerWithMathCtx(convertorOne, convertorTwo, divisionByZeroReturnsNull, optionalMathContext);
}
return new ModuloDouble();
}
示例3: ExprBetweenCompBigDecimal
import com.espertech.esper.util.SimpleNumberCoercerFactory; //导入方法依赖的package包/类
public ExprBetweenCompBigDecimal(boolean lowIncluded, boolean highIncluded, Class valueType, Class lowerType, Class upperType)
{
isLowIncluded = lowIncluded;
isHighIncluded = highIncluded;
numberCoercerLower = SimpleNumberCoercerFactory.getCoercerBigDecimal(lowerType);
numberCoercerUpper = SimpleNumberCoercerFactory.getCoercerBigDecimal(upperType);
numberCoercerValue = SimpleNumberCoercerFactory.getCoercerBigDecimal(valueType);
}
示例4: makeBigDecimalComputer
import com.espertech.esper.util.SimpleNumberCoercerFactory; //导入方法依赖的package包/类
private Computer makeBigDecimalComputer(Class typeOne, Class typeTwo, boolean divisionByZeroReturnsNull)
{
if ((typeOne == BigDecimal.class) && (typeTwo == BigDecimal.class))
{
if (this == DIVIDE)
{
return new DivideBigDec(divisionByZeroReturnsNull);
}
return computers.get(new MultiKeyUntyped(new Object[] {BigDecimal.class, this}));
}
SimpleNumberBigDecimalCoercer convertorOne = SimpleNumberCoercerFactory.getCoercerBigDecimal(typeOne);
SimpleNumberBigDecimalCoercer convertorTwo = SimpleNumberCoercerFactory.getCoercerBigDecimal(typeTwo);
if (this == ADD)
{
return new AddBigDecConvComputer(convertorOne, convertorTwo);
}
if (this == SUBTRACT)
{
return new SubtractBigDecConvComputer(convertorOne, convertorTwo);
}
if (this == MULTIPLY)
{
return new MultiplyBigDecConvComputer(convertorOne, convertorTwo);
}
if (this == DIVIDE)
{
return new DivideBigDecConvComputer(convertorOne, convertorTwo, divisionByZeroReturnsNull);
}
return new ModuloDouble();
}