@Beta @NonNullByDefault public class Decimal64 extends Number implements CanonicalValue<Decimal64>
BigDecimal, but provides more
efficient storage, as it has fixed precision.| Modifier and Type | Class and Description |
|---|---|
static class |
Decimal64.Support |
| Modifier | Constructor and Description |
|---|---|
protected |
Decimal64(Decimal64 other) |
| Modifier and Type | Method and Description |
|---|---|
byte |
byteValueExact()
Converts this
BigDecimal to a byte, checking for lost information. |
int |
compareTo(Decimal64 o) |
BigDecimal |
decimalValue() |
double |
doubleValue() |
boolean |
equals(@Nullable Object obj) |
float |
floatValue() |
int |
hashCode() |
int |
intValue() |
int |
intValueExact()
Converts this
BigDecimal to an int, checking for lost information. |
long |
longValue() |
long |
longValueExact()
Converts this
BigDecimal to a long, checking for lost information. |
short |
shortValueExact()
Converts this
BigDecimal to a short, checking for lost information. |
CanonicalValueSupport<Decimal64> |
support()
Return the
CanonicalValue associated with this type. |
String |
toCanonicalString()
Return the canonical string representation of this value.
|
String |
toString() |
static Decimal64 |
valueOf(BigDecimal decimalVal) |
static Decimal64 |
valueOf(byte byteVal) |
static Decimal64 |
valueOf(double doubleVal) |
static Decimal64 |
valueOf(int intVal) |
static Decimal64 |
valueOf(long longVal) |
static Decimal64 |
valueOf(short shortVal) |
static Decimal64 |
valueOf(String str)
Attempt to parse a String into a Decimal64.
|
byteValue, shortValueclone, finalize, getClass, notify, notifyAll, wait, wait, waitvalidatorprotected Decimal64(Decimal64 other)
public static Decimal64 valueOf(byte byteVal)
public static Decimal64 valueOf(short shortVal)
public static Decimal64 valueOf(int intVal)
public static Decimal64 valueOf(long longVal)
public static Decimal64 valueOf(double doubleVal)
public static Decimal64 valueOf(BigDecimal decimalVal)
public static Decimal64 valueOf(String str)
str - String to parserNullPointerException - if value is null.NumberFormatException - if the string does not contain a parsable decimal64.public final BigDecimal decimalValue()
public final float floatValue()
floatValue in class Numberpublic final double doubleValue()
doubleValue in class Numberpublic final byte byteValueExact()
BigDecimal to a byte, checking for lost information. If this Decimal64 has
a nonzero fractional part or is out of the possible range for a byte result then
an ArithmeticException is thrown.Decimal64 converted to a byte.ArithmeticException - if this has a nonzero fractional part, or will not fit in a byte.public final short shortValueExact()
BigDecimal to a short, checking for lost information. If this Decimal64 has
a nonzero fractional part or is out of the possible range for a short result then
an ArithmeticException is thrown.Decimal64 converted to a short.ArithmeticException - if this has a nonzero fractional part, or will not fit in a short.public final int intValueExact()
BigDecimal to an int, checking for lost information. If this Decimal64 has
a nonzero fractional part or is out of the possible range for an int result then
an ArithmeticException is thrown.Decimal64 converted to an int.ArithmeticException - if this has a nonzero fractional part, or will not fit in an int.public final long longValueExact()
BigDecimal to a long, checking for lost information. If this Decimal64 has
a nonzero fractional part then an ArithmeticException is thrown.Decimal64 converted to a long.ArithmeticException - if this has a nonzero fractional part.public final int compareTo(Decimal64 o)
compareTo in interface Comparable<Decimal64>public final String toCanonicalString()
CanonicalValuetoCanonicalString in interface CanonicalValue<Decimal64>public final CanonicalValueSupport<Decimal64> support()
CanonicalValueCanonicalValue associated with this type. It can be used to create new instances of this
representation.support in interface CanonicalValue<Decimal64>CanonicalValue instance.Copyright © 2019 OpenDaylight. All rights reserved.