com.wombat.mama
public class MamaPrice extends java.lang.Object implements java.lang.Comparable
Modifier and Type | Field and Description |
---|---|
static double |
EPSILON
MAMA_PRICE_EPSILON a value that is considered equivalent to zero.
|
Constructor and Description |
---|
MamaPrice() |
MamaPrice(double value) |
MamaPrice(double value,
MamaPricePrecision precision) |
MamaPrice(MamaPrice src) |
Modifier and Type | Method and Description |
---|---|
void |
add(double value) |
void |
add(MamaPrice value) |
void |
clear() |
int |
compareTo(java.lang.Object obj) |
void |
copy(MamaPrice price) |
void |
destroy() |
boolean |
equals(java.lang.Object obj) |
MamaPriceHints |
getHints() |
boolean |
getIsValidPrice() |
MamaPricePrecision |
getPrecision() |
double |
getRoundedValue()
This function obtains the double value of the price rounded to zero precision.
|
double |
getRoundedValue(MamaPricePrecision precision)
This function obtains the double value of the price rounded to the supplied precision.
|
double |
getValue() |
int |
hashCode() |
boolean |
isZero() |
void |
negate() |
void |
set(double priceValue,
MamaPriceHints hints) |
void |
setHints(MamaPriceHints hints) |
void |
setIsValidPrice(boolean valid) |
void |
setPrecision(MamaPricePrecision precision) |
void |
setValue(double value) |
void |
subtract(double value) |
void |
subtract(MamaPrice value) |
java.lang.String |
toString() |
public static final double EPSILON
public MamaPrice()
public MamaPrice(double value)
public MamaPrice(double value, MamaPricePrecision precision)
public MamaPrice(MamaPrice src)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
public void add(MamaPrice value)
public void add(double value)
public void subtract(MamaPrice value)
public void subtract(double value)
public void clear()
public void set(double priceValue, MamaPriceHints hints)
public void setValue(double value)
public void setPrecision(MamaPricePrecision precision)
public void setHints(MamaPriceHints hints)
public double getValue()
public double getRoundedValue()
com.wombat.mama
- MamaException thrown if the underlying JNI object has been destroyed.com.wombat.common.WombatException
- for other general MAMA errors.public double getRoundedValue(MamaPricePrecision precision)
com.wombat.mama
- MamaException thrown if the underlying JNI object has been destroyed.com.wombat.common.WombatException
- for other general MAMA errors.public MamaPricePrecision getPrecision()
public MamaPriceHints getHints()
public java.lang.String toString()
toString
in class java.lang.Object
public void negate()
public boolean isZero()
public void setIsValidPrice(boolean valid)
public boolean getIsValidPrice()
public void copy(MamaPrice price)
public void destroy()
Copyright 2011 NYSE Technologies