public class MarketBasis
extends java.lang.Object
MarketBasis
is an immutable data object specifying the settings for the market. This includes the price
range, the commodity being exchanges, the currency being used and the number of price steps used in the demand
arrays.Modifier and Type | Field and Description |
---|---|
static java.text.DecimalFormat |
DEMAND_FORMAT
The
DecimalFormat that should be used to print demand. |
static java.text.DecimalFormat |
PRICE_FORMAT
The
DecimalFormat that should be used to print prices. |
static java.text.DecimalFormatSymbols |
ROOT_SYMBOLS
A
DecimalFormatSymbols that is language/country-neutral. |
Constructor and Description |
---|
MarketBasis(java.lang.String commodity,
java.lang.String currency,
int priceSteps,
double minimumPrice,
double maximumPrice)
A constructor used to create an instance of this class.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getCommodity() |
java.lang.String |
getCurrency() |
double |
getMaximumPrice() |
double |
getMinimumPrice() |
double |
getPriceIncrement() |
int |
getPriceSteps() |
int |
hashCode() |
java.lang.String |
toString() |
public static final java.text.DecimalFormatSymbols ROOT_SYMBOLS
DecimalFormatSymbols
that is language/country-neutral.public static final java.text.DecimalFormat PRICE_FORMAT
DecimalFormat
that should be used to print prices.public static final java.text.DecimalFormat DEMAND_FORMAT
DecimalFormat
that should be used to print demand.public MarketBasis(java.lang.String commodity, java.lang.String currency, int priceSteps, double minimumPrice, double maximumPrice)
commodity
- the commodity that is to be handled by this market.currency
- the 3 character currency code.priceSteps
- the number of price steps used when converting a PointBid
to an ArrayBid
minimumPrice
- the minimum price that is valid in this market (inclusive)maximumPrice
- the maximum price that is valid in this market (inclusive)public java.lang.String getCommodity()
public java.lang.String getCurrency()
public double getMaximumPrice()
public double getMinimumPrice()
public final double getPriceIncrement()
public int getPriceSteps()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object