public final class WideDecimal extends Number implements Comparable<WideDecimal>
WideDecimal
class contains a set of methods to work with
floating-point numbers packed into long
primitive type.
Also, it can be used to wrap a single value in an object with interface
like that of the Number
class.Modifier and Type | Field and Description |
---|---|
static long |
NaN |
static String |
NAN_STRING |
static long |
NEGATIVE_INFINITY |
static String |
NEGATIVE_INFINITY_STRING |
static long |
POSITIVE_INFINITY |
static String |
POSITIVE_INFINITY_STRING |
static long |
ZERO |
static String |
ZERO_STRING |
Constructor and Description |
---|
WideDecimal(long wide) |
WideDecimal(String s) |
Modifier and Type | Method and Description |
---|---|
static long |
abs(long wide) |
static StringBuilder |
appendTo(StringBuilder sb,
long wide) |
static long |
average(long w1,
long w2) |
static long |
averageDefined(long w1,
long w2) |
byte |
byteValue() |
static int |
compare(long w1,
long w2) |
int |
compareTo(WideDecimal other) |
static long |
composeToScale(double value,
int targetScale) |
static long |
composeToScale(long value,
int targetScale) |
static long |
composeToScale(long significand,
int scale,
int targetScale) |
static long |
composeWide(double value) |
static long |
composeWide(long value) |
static long |
composeWide(long significand,
int scale) |
static long |
divide(long w1,
long w2) |
double |
doubleValue() |
boolean |
equals(Object obj) |
float |
floatValue() |
static int |
getScale(long wide) |
static long |
getSignificand(long wide) |
int |
hashCode() |
int |
intValue() |
static boolean |
isDefined(long wide) |
static boolean |
isFinite(long wide) |
boolean |
isInfinite() |
static boolean |
isInfinite(long wide) |
boolean |
isNaN() |
static boolean |
isNaN(long wide) |
long |
longValue() |
static long |
max(long w1,
long w2) |
static long |
maxDefined(long w1,
long w2) |
static long |
min(long w1,
long w2) |
static long |
minDefined(long w1,
long w2) |
static long |
multiply(long w1,
long w2) |
static long |
neg(long wide) |
static long |
parseToScale(String s,
int targetScale) |
static long |
parseWide(String s) |
static long |
round(long wide) |
static long |
round(long wide,
int scale) |
static long |
selectDefined(long w1,
long w2) |
short |
shortValue() |
static int |
signum(long wide) |
static long |
subtract(long w1,
long w2) |
static long |
subtractDefined(long w1,
long w2) |
static long |
sum(long w1,
long w2) |
static long |
sumDefined(long w1,
long w2) |
static double |
toDouble(long wide) |
static long |
toLong(long wide) |
static long |
toScale(long wide,
int targetScale) |
String |
toString() |
static String |
toString(long wide) |
static long |
zeroToScale(int targetScale) |
public static final long NaN
public static final long POSITIVE_INFINITY
public static final long NEGATIVE_INFINITY
public static final long ZERO
public static final String NAN_STRING
public static final String POSITIVE_INFINITY_STRING
public static final String NEGATIVE_INFINITY_STRING
public static final String ZERO_STRING
public WideDecimal(long wide)
public WideDecimal(String s) throws NumberFormatException
NumberFormatException
public static String toString(long wide)
public static StringBuilder appendTo(StringBuilder sb, long wide)
public static long parseWide(String s) throws NumberFormatException
NumberFormatException
public static long parseToScale(String s, int targetScale) throws NumberFormatException
NumberFormatException
public static double toDouble(long wide)
public static long toLong(long wide)
public static long composeWide(double value)
public static long composeToScale(double value, int targetScale)
public static long composeWide(long value)
public static long composeToScale(long value, int targetScale)
public static long composeWide(long significand, int scale)
public static long composeToScale(long significand, int scale, int targetScale)
public static long getSignificand(long wide)
public static int getScale(long wide)
public static boolean isNaN(long wide)
public static boolean isDefined(long wide)
public static boolean isInfinite(long wide)
public static boolean isFinite(long wide)
public static int signum(long wide)
public static long neg(long wide)
public static long abs(long wide)
public static long round(long wide)
public static long round(long wide, int scale)
public static long toScale(long wide, int targetScale)
public static long zeroToScale(int targetScale)
public static long selectDefined(long w1, long w2)
public static long sum(long w1, long w2)
public static long sumDefined(long w1, long w2)
public static long subtract(long w1, long w2)
public static long subtractDefined(long w1, long w2)
public static long average(long w1, long w2)
public static long averageDefined(long w1, long w2)
public static long multiply(long w1, long w2)
public static long divide(long w1, long w2)
public static long max(long w1, long w2)
public static long maxDefined(long w1, long w2)
public static long min(long w1, long w2)
public static long minDefined(long w1, long w2)
public static int compare(long w1, long w2)
public boolean isNaN()
public boolean isInfinite()
public short shortValue()
shortValue
in class Number
public float floatValue()
floatValue
in class Number
public double doubleValue()
doubleValue
in class Number
public int compareTo(WideDecimal other)
compareTo
in interface Comparable<WideDecimal>
Copyright © 2002–2025 Devexperts LLC. All rights reserved.