public class MFDecimal
extends java.lang.Object
implements java.lang.Comparable
| Modifier and Type | Field and Description |
|---|---|
static MFDecimal |
NA
Special value: Not Applicable.
|
static MFDecimal |
NDA
Special value: No Data Available.
|
static MFDecimal |
NMA
Special value: No Market Available.
|
static MFDecimal |
ZERO
Special value: Zero (as a convenience).
|
| Constructor and Description |
|---|
MFDecimal(java.lang.String s)
Constructor which accepts a string value.
|
| Modifier and Type | Method and Description |
|---|---|
MFDecimal |
abs()
Absolute value.
|
int |
compareTo(java.lang.Object o)
Implements Comparable method compareTo.
|
boolean |
equals(MFDecimal o)
Comparison operator: equal.
|
boolean |
gt(MFDecimal o)
Comparison operator: greater-than.
|
boolean |
gte(MFDecimal o)
Comparison operator: greater-than or equal.
|
int |
hashCode()
Forwards to raw value.
|
static boolean |
isValid(MFDecimal o)
Check if MFDecimal object has valid value.
|
boolean |
lt(MFDecimal o)
Comparison operator: less-than.
|
boolean |
lte(MFDecimal o)
Comparison operator: less-than or equal.
|
MFDecimal |
neg()
Negate value.
|
double |
toDouble()
Convert the value.
|
long |
toLong()
Convert the value.
|
java.lang.String |
toString()
Provide access to the raw value.
|
static MFDecimal |
valueOf(java.math.BigDecimal num)
Returns a MFDecimal object for the given representation of a FP number.
|
static MFDecimal |
valueOf(double num)
Returns a MFDecimal object for the given representation of a FP number.
|
static MFDecimal |
valueOf(long num)
Returns a MFDecimal object for the given representation of a FP number.
|
static MFDecimal |
valueOf(java.lang.String s)
Returns a MFDecimal object for the given representation of a FP number.
|
public static MFDecimal NMA
public static MFDecimal NDA
public static MFDecimal NA
public static MFDecimal ZERO
public MFDecimal(java.lang.String s)
throws java.lang.NumberFormatException
java.lang.NumberFormatExceptionpublic static MFDecimal valueOf(java.lang.String s) throws java.lang.NumberFormatException
java.lang.NumberFormatExceptionpublic static MFDecimal valueOf(java.math.BigDecimal num) throws java.lang.NumberFormatException
java.lang.NumberFormatExceptionpublic static MFDecimal valueOf(double num)
public static MFDecimal valueOf(long num)
public long toLong()
public double toDouble()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(MFDecimal o)
public boolean lte(MFDecimal o)
public boolean gte(MFDecimal o)
public boolean lt(MFDecimal o)
public boolean gt(MFDecimal o)
public MFDecimal neg()
public MFDecimal abs()
public int compareTo(java.lang.Object o)
throws java.lang.ClassCastException
compareTo in interface java.lang.Comparablejava.lang.ClassCastExceptionpublic static boolean isValid(MFDecimal o)