public class HecDouble
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static int |
EXPONENTIAL_NUMBER |
static int |
NO_PRECISION_SET |
static int |
NO_VALUE_SET |
| Constructor and Description |
|---|
HecDouble() |
HecDouble(double value) |
HecDouble(double value,
int precision) |
HecDouble(HecDouble hecDouble) |
HecDouble(java.lang.String stringValue) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(double value) |
void |
add(HecDouble value) |
int |
compare(double val) |
int |
compareTo(double val)
Compares this value with double input value (precision ignored).
|
int |
compareTo(double val,
double tolerance) |
int |
compareTo(HecDouble hecDouble)
Compares this value with input value (precision accounted for).
|
int |
compareTo(HecDouble hecDouble,
double tolerance) |
void |
divide(double value) |
void |
divide(HecDouble value) |
boolean |
equal(double value,
double tolerance) |
boolean |
equals(HecDouble value) |
boolean |
equalsWithinPercent(HecDouble value,
double percent) |
boolean |
equalsWithinTolerance(HecDouble value,
double tolerance) |
static int |
estimatePrecision(double value,
int sigDigits) |
static java.lang.String |
formatPattern(int precision) |
static java.lang.String |
formatPattern(int precision,
char decimalSeparator) |
boolean |
getShowCommas() |
double |
getTolerances(HecDouble value) |
boolean |
greaterThan(double value,
double tolerance) |
boolean |
greaterThan(HecDouble value) |
boolean |
greaterThanEqual(double value,
double tolerance) |
boolean |
greaterThanEqual(HecDouble value) |
boolean |
isDefined() |
boolean |
lessThan(double value,
double tolerance) |
boolean |
lessThan(HecDouble value) |
boolean |
lessThanEqual(double value,
double tolerance) |
boolean |
lessThanEqual(HecDouble value) |
void |
multiply(double value) |
void |
multiply(HecDouble value) |
int |
precision() |
boolean |
precisionSet() |
void |
set(double value) |
void |
set(double value,
int precision) |
void |
set(HecDouble hecDouble) |
int |
set(java.lang.String value) |
int |
setPrecision(int precision) |
void |
setShowCommas(boolean showCommas) |
void |
setSignificantDigits(int sigDigits) |
void |
setUndefined() |
java.lang.String |
string() |
java.lang.String |
string(boolean printCommas) |
java.lang.String |
string(boolean printCommas,
java.text.DecimalFormatSymbols symbols) |
static java.lang.String |
string(double value,
int precision,
boolean printCommas) |
static java.lang.String |
string(double value,
int precision,
boolean printCommas,
java.text.DecimalFormatSymbols symbols) |
static java.lang.String |
string(double value,
int precision,
boolean printCommas,
java.text.DecimalFormatSymbols symbols,
java.lang.String undefinedString) |
java.lang.String |
string(int precision,
boolean printCommas) |
java.lang.String |
string(java.lang.String undefinedString) |
void |
subtract(double value) |
void |
subtract(HecDouble value) |
java.lang.String |
toString() |
double |
value() |
public static final int NO_PRECISION_SET
public static final int EXPONENTIAL_NUMBER
public static final int NO_VALUE_SET
public HecDouble()
public HecDouble(java.lang.String stringValue)
public HecDouble(double value,
int precision)
public HecDouble(double value)
public HecDouble(HecDouble hecDouble)
public int set(java.lang.String value)
public void set(double value)
public void set(double value,
int precision)
public void set(HecDouble hecDouble)
public void setUndefined()
public int setPrecision(int precision)
public void setSignificantDigits(int sigDigits)
public void setShowCommas(boolean showCommas)
public boolean getShowCommas()
public static int estimatePrecision(double value,
int sigDigits)
public boolean isDefined()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String string()
public java.lang.String string(boolean printCommas)
public java.lang.String string(java.lang.String undefinedString)
public java.lang.String string(boolean printCommas,
java.text.DecimalFormatSymbols symbols)
public java.lang.String string(int precision,
boolean printCommas)
public static java.lang.String string(double value,
int precision,
boolean printCommas)
public static java.lang.String string(double value,
int precision,
boolean printCommas,
java.text.DecimalFormatSymbols symbols)
public static java.lang.String string(double value,
int precision,
boolean printCommas,
java.text.DecimalFormatSymbols symbols,
java.lang.String undefinedString)
public static java.lang.String formatPattern(int precision)
public static java.lang.String formatPattern(int precision,
char decimalSeparator)
public double value()
public boolean precisionSet()
public int precision()
public void add(double value)
public void add(HecDouble value)
public void subtract(double value)
public void subtract(HecDouble value)
public void multiply(double value)
public void multiply(HecDouble value)
public void divide(double value)
public void divide(HecDouble value)
public boolean equals(HecDouble value)
public boolean lessThan(HecDouble value)
public boolean lessThanEqual(HecDouble value)
public boolean greaterThan(HecDouble value)
public boolean greaterThanEqual(HecDouble value)
public boolean equalsWithinTolerance(HecDouble value, double tolerance)
public boolean equalsWithinPercent(HecDouble value, double percent)
public boolean equal(double value,
double tolerance)
public boolean lessThan(double value,
double tolerance)
public boolean lessThanEqual(double value,
double tolerance)
public boolean greaterThan(double value,
double tolerance)
public boolean greaterThanEqual(double value,
double tolerance)
public double getTolerances(HecDouble value)
public int compareTo(HecDouble hecDouble)
value - public int compareTo(HecDouble hecDouble, double tolerance)
public int compareTo(double val,
double tolerance)
public int compare(double val)
public int compareTo(double val)
value -