public final class DecimalUtils extends Object
Modifier and Type | Method and Description |
---|---|
static int |
extractNanosecondDecimal(BigDecimal value,
long integer) |
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) |
static String |
toDecimal(long seconds,
int nanoseconds) |
public static String toDecimal(long seconds, int nanoseconds)
public static BigDecimal toBigDecimal(long seconds, int nanoseconds)
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 © 2019 JBoss by Red Hat. All rights reserved.