| Modifier and Type | Field and Description |
|---|---|
static java.text.DecimalFormat |
PRICE_FORMAT
The
DecimalFormat used to format the String representation of this instance's priceValue. |
| Constructor and Description |
|---|
Price(MarketBasis marketBasis,
double price)
A constructor to create an instance of Price.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Price that)
Compares this object with the specified object for order.
|
boolean |
equals(java.lang.Object obj) |
MarketBasis |
getMarketBasis() |
double |
getPriceValue() |
int |
hashCode() |
PriceStep |
toPriceStep() |
java.lang.String |
toString() |
public static final java.text.DecimalFormat PRICE_FORMAT
DecimalFormat used to format the String representation of this instance's priceValue.public Price(MarketBasis marketBasis, double price)
marketBasis - the MarketBasis of this Price.price - the value of this Price.public MarketBasis getMarketBasis()
public double getPriceValue()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(Price that)
compareTo in interface java.lang.Comparable<Price>that - The Price instance you want to compare with this one.java.lang.IllegalArgumentException - is the MarketBasis is null.