public final class DecimalUtils extends Object
Modifier and Type | Method and Description |
---|---|
static int |
extractNanosecondDecimal(BigDecimal value,
long integer)
Deprecated.
due to potential unbounded latency on some JRE releases.
|
static <T> T |
extractSecondsAndNanos(BigDecimal seconds,
BiFunction<Long,Integer,T> convert)
Extracts the seconds and nanoseconds component of
seconds as long and int
values, passing them to the given converter. |
static BigDecimal |
toBigDecimal(long seconds,
int nanoseconds)
Factory method for constructing
BigDecimal out of second, nano-second
components. |
static String |
toDecimal(long seconds,
int nanoseconds) |
public static String toDecimal(long seconds, int nanoseconds)
public static BigDecimal toBigDecimal(long seconds, int nanoseconds)
BigDecimal
out of second, nano-second
components.@Deprecated public static int extractNanosecondDecimal(BigDecimal value, long integer)
public static <T> T extractSecondsAndNanos(BigDecimal seconds, BiFunction<Long,Integer,T> convert)
seconds
as long
and int
values, passing them to the given converter. The implementation avoids latency issues present
on some JRE releases.Copyright © 2021 JBoss by Red Hat. All rights reserved.