public abstract class AbstractSubjectInfo extends Object implements SubjectInfo
SubjectInfo
with common functions
shared by the subclasses FXSubjectInfo
and MetalSubjectInfo
.Modifier | Constructor and Description |
---|---|
protected |
AbstractSubjectInfo(String subject,
String subjectPrefix,
String baseCurrency,
String termCurrency,
String amountIn,
String tenor,
String amount,
String marginBand)
Constructs an AbstractSubjectInfo based on the provided subscription parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Two AbstractSubjectInfo instances are equal if they have the same value for:
|
String |
getAmount()
Returns the amount for the subscription, specified as a quantity of the unit returned by
getAmount() . |
String |
getAmountIn()
Returns the unit that the amount returned by
getAmount() is specified in. |
String |
getBaseCurrency()
Returns the base currency for the subscription.
|
String |
getBrokenDate()
The settlement date, if request was for a broken date.
|
String |
getCurrencyPair()
Returns the currency pair for the subscription.
|
String |
getMarginBand()
Returns the margin band for the subscription.
|
String |
getSubject()
Returns the original subject that was parsed to create this SubjectInfo
|
String |
getSubjectPrefix()
Returns the prefix from the start of the subject, for example "/FX".
|
String |
getTenor()
Returns the tenor for the subscription.
|
String |
getTermCurrency()
Returns the term currency for the subscription.
|
int |
hashCode()
Two AbstractSubjectInfo instances have the same hash code if they have the same values for:
|
abstract boolean |
isMetal()
Abstract method that indicates whether this class represents a metal subscription or not.
|
String |
toString() |
protected AbstractSubjectInfo(String subject, String subjectPrefix, String baseCurrency, String termCurrency, String amountIn, String tenor, String amount, String marginBand)
subjectPrefix
- A string such as "/FX".baseCurrency
- The first currency in the currency pair. For example if the currency pair is "GBPUSD" the
base currency is "GBP".termCurrency
- The second currency in the currency pair. For example if the currency pair is "GBPUSD" the
base currency is "USD".amountIn
- The currency or unit that the amount is specified in. For example, in an FX rates
subscription for "GBPUSD", the unit of the amount could be either "GBP" or "USD". This
is typically referred to as the "dealt currency". For a precious metals subscription,
the unit of the amount could be something like OZT or Kilos.tenor
- The tenor for the subscription.amount
- The amount for the subscription, specified as a quantity of the amountIn unit.
Useful for volume banding.marginBand
- The margin band for the subscription. Sometimes referred to as the price tier.public abstract boolean isMetal()
public String getCurrencyPair()
<base currency><term currency>
. For example, if the base
currency is "GBP" and the term currency is "USD" this method will return the string "GBPUSD".public String getBaseCurrency()
public String getTermCurrency()
public String getTenor()
public String getBrokenDate()
public String getAmountIn()
getAmount()
is specified in. For an FX rate subscription
this will
be one of the two currencies in the pair, known usually as the "dealt currency". For a precious metals
subscription this
will return a unit such as OZT or Kilos.public String getAmount()
getAmount()
.
Generally used for
determining which volume-banded price the subscription should be provided with.public String getMarginBand()
public String getSubjectPrefix()
public String getSubject()
SubjectInfo
getSubject
in interface SubjectInfo
public int hashCode()
public boolean equals(Object obj)
Copyright © 2015 Caplin Systems.