Class ToBigDecimal

java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.from_long.to_bigdecimal.ToBigDecimal
All Implemented Interfaces:
LongFunction<BigDecimal>

public class ToBigDecimal extends Object implements LongFunction<BigDecimal>
Convert values to BigDecimals at configurable scale or precision.

ToBigDecimal(...) functions which take whole-numbered inputs may have a scale parameter or a custom MathContext, but not both. The scale parameter is not supported for String or Double input forms.

  • Constructor Details

    • ToBigDecimal

      public ToBigDecimal()
    • ToBigDecimal

      public ToBigDecimal(int scale)
    • ToBigDecimal

      public ToBigDecimal(String context)
      Convert all input values to BigDecimal values with a specific MathContext. This form is only supported for scale=0, meaning whole numbers. The value for context can be one of UNLIMITED, DECIMAL32, DECIMAL64, DECIMAL128, or any valid configuration supported by MathContext(String), such as "precision=32 roundingMode=CEILING". In the latter form, roundingMode can be any valid value for RoundingMode, like UP, DOWN, CEILING, FLOOR, HALF_UP, HALF_DOWN, HALF_EVEN, or UNNECESSARY.
  • Method Details