Class SimpleNumberCoercerFactory

java.lang.Object
com.espertech.esper.common.internal.util.SimpleNumberCoercerFactory

public class SimpleNumberCoercerFactory extends Object
Factory for conversion/coercion and widening implementations for numbers.
  • Constructor Details

    • SimpleNumberCoercerFactory

      public SimpleNumberCoercerFactory()
  • Method Details

    • getCoercerBigDecimal

      public static SimpleNumberBigDecimalCoercer getCoercerBigDecimal(EPTypeClass fromType)
      Returns a coercer/widener to BigDecimal for a given type.
      Parameters:
      fromType - to widen
      Returns:
      widener
    • getCoercerBigInteger

      public static SimpleNumberBigIntegerCoercer getCoercerBigInteger(EPTypeClass fromType)
      Returns a coercer/widener to BigInteger for a given type.
      Parameters:
      fromType - to widen
      Returns:
      widener
    • getCoercer

      public static SimpleNumberCoercer getCoercer(EPType fromType, EPTypeClass resultBoxed)
      Returns a coercer/widener/narrower to a result number type from a given type.
      Parameters:
      fromType - to widen/narrow, can be null to indicate that no shortcut-coercer is used
      resultBoxed - type to widen/narrow to
      Returns:
      widener/narrower