public class Decimal extends Object
| Constructor and Description |
|---|
Decimal(int i) |
Decimal(String value) |
Decimal(String value,
int precision)
There are a few circumstances where a simple value is known to be correct to a high
precision.
|
| Modifier and Type | Method and Description |
|---|---|
Decimal |
add(Decimal other) |
String |
asDecimal() |
int |
asInteger() |
String |
asScientific() |
int |
comparesTo(Decimal other) |
Decimal |
copy() |
Decimal |
divide(Decimal other) |
Decimal |
divInt(Decimal other) |
boolean |
equals(Decimal other) |
boolean |
equals(Decimal value,
Decimal maxDifference) |
boolean |
isOne() |
boolean |
isWholeNumber() |
boolean |
isZero() |
Decimal |
modulo(Decimal other) |
Decimal |
multiply(Decimal other) |
static Decimal |
one() |
Decimal |
subtract(Decimal other) |
String |
toString() |
Decimal |
trunc() |
static Decimal |
zero() |
public Decimal(String value) throws UcumException
UcumExceptionpublic Decimal(String value, int precision) throws UcumException
value - - a string representation of the valueprecision - - aUcumExceptionpublic Decimal(int i)
public boolean isZero()
public boolean isOne()
public int comparesTo(Decimal other)
public boolean isWholeNumber()
public int asInteger() throws UcumException
UcumExceptionpublic String asScientific()
public Decimal divide(Decimal other) throws UcumException
UcumExceptionpublic Decimal divInt(Decimal other) throws UcumException
UcumExceptionpublic Decimal modulo(Decimal other) throws UcumException
UcumExceptionCopyright © 2014–2019 University Health Network. All rights reserved.