public enum Scale extends Enum<Scale>
Precision.
| Enum Constant and Description |
|---|
HUNDRED_MILLIONS |
HUNDRED_MILLIONTHS |
HUNDRED_THOUSANDS |
HUNDRED_THOUSANDTHS |
HUNDREDS |
HUNDREDTHS |
MILLIONS |
MILLIONTHS |
TEN_MILLIONS |
TEN_MILLIONTHS |
TEN_THOUSANDS |
TEN_THOUSANDTHS |
TENS |
TENTHS |
THOUSANDS |
THOUSANDTHS |
UNITS |
| Modifier and Type | Field and Description |
|---|---|
static double |
HALF
HALF
|
static double[] |
NEGATIVE_SCALE_DECIMALS |
static double[] |
POSITIVE_SCALE_DECIMALS |
| Modifier and Type | Method and Description |
|---|---|
double |
calculateDoubleFromUnscaledValue(long aValue)
calculateDouble.
|
double |
calculateUnscaledValue(double aValue)
calculateUnscaledValue.
|
double |
getDecimal()
getPrecision.
|
int |
getScale()
getNbDigit.
|
static Scale |
valueOf(double aDecimal)
getPrecision.
|
static Scale |
valueOf(int aScale)
getPrecision.
|
static Scale |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Scale[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Scale UNITS
public static final Scale TENTHS
public static final Scale HUNDREDTHS
public static final Scale THOUSANDTHS
public static final Scale TEN_THOUSANDTHS
public static final Scale HUNDRED_THOUSANDTHS
public static final Scale MILLIONTHS
public static final Scale TEN_MILLIONTHS
public static final Scale HUNDRED_MILLIONTHS
public static final Scale TENS
public static final Scale HUNDREDS
public static final Scale THOUSANDS
public static final Scale TEN_THOUSANDS
public static final Scale HUNDRED_THOUSANDS
public static final Scale MILLIONS
public static final Scale TEN_MILLIONS
public static final Scale HUNDRED_MILLIONS
public static final double[] NEGATIVE_SCALE_DECIMALS
public static final double[] POSITIVE_SCALE_DECIMALS
public static final double HALF
public static Scale[] values()
for (Scale c : Scale.values()) System.out.println(c);
public static Scale valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullpublic final double calculateUnscaledValue(double aValue)
aValue - public final double calculateDoubleFromUnscaledValue(long aValue)
aValue - public final int getScale()
public final double getDecimal()
public static Scale valueOf(int aScale)
aScale - public static final Scale valueOf(double aDecimal)
aDecimal - Copyright © 2012–2013 hermod. All rights reserved.