|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lmax.api.FixedPointNumbers
public class FixedPointNumbers
A utility class containing conversion methods to/from FixedPointNumber for a variety of formats.
Constructor Summary | |
---|---|
FixedPointNumbers()
|
Method Summary | |
---|---|
static java.math.BigDecimal |
bigDecimalValue(FixedPointNumber value)
Convert a FixedPointNumber to a big decimal. |
static double |
doubleValue(FixedPointNumber value)
Get a double value from a FixedPointNumber. |
static FixedPointNumber |
toFixedPointNumber(java.math.BigDecimal value,
FixedPointNumber increment)
Constructs a FixedPointNumber from a BigDecimal. |
static FixedPointNumber |
toFixedPointNumber(double value,
FixedPointNumber increment)
Constructs a FixedPointNumber from a double. |
static FixedPointNumber |
toFixedPointNumber(long value,
FixedPointNumber increment)
Constructs a FixedPointNumber from a long, where a long represents a number with 6 decimal places. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FixedPointNumbers()
Method Detail |
---|
public static FixedPointNumber toFixedPointNumber(long value, FixedPointNumber increment)
value
- A long representing 6 decimal placesincrement
- The specified increment to use in rounding
FixedPointNumber
,
RoundingMode.HALF_EVEN
,
Instrument.getOrderBook()
public static FixedPointNumber toFixedPointNumber(double value, FixedPointNumber increment)
value
- Value to be usedincrement
- The specified increment to use in rounding
FixedPointNumber
,
RoundingMode.HALF_EVEN
,
Instrument.getOrderBook()
public static FixedPointNumber toFixedPointNumber(java.math.BigDecimal value, FixedPointNumber increment)
value
- Value to be usedincrement
- The specified increment to use in rounding
FixedPointNumber
,
RoundingMode.HALF_EVEN
,
Instrument.getOrderBook()
public static double doubleValue(FixedPointNumber value)
value
- The value to convert
public static java.math.BigDecimal bigDecimalValue(FixedPointNumber value)
value
- The value to convert
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |