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 Decimal copy()
public static Decimal zero()
public boolean isZero()
public static Decimal one()
public boolean isOne()
public boolean equals(Decimal other)
public int comparesTo(Decimal other)
public boolean isWholeNumber()
public String asDecimal()
public int asInteger()
throws UcumException
UcumExceptionpublic String asScientific()
public Decimal trunc()
public Decimal divide(Decimal other) throws UcumException
UcumExceptionpublic Decimal divInt(Decimal other) throws UcumException
UcumExceptionpublic Decimal modulo(Decimal other) throws UcumException
UcumExceptionCopyright © 2014–2017 University Health Network. All rights reserved.