Package com.caplin.motif.fx.rates
Class RateSubjectInfo
- java.lang.Object
-
- com.caplin.motif.fx.rates.RateSubjectInfo
-
- All Implemented Interfaces:
SubjectInfo
public class RateSubjectInfo extends java.lang.Object implements SubjectInfo
-
-
Constructor Summary
Constructors Constructor Description RateSubjectInfo(java.lang.String subject, java.lang.String currencyPair, java.lang.String tenor, java.lang.String amountQualifier, java.lang.String amount, java.lang.String marginBand)
Constructs an RateSubjectInfo based on the provided subscription parameters.RateSubjectInfo(java.lang.String subject, java.lang.String currencyPair, java.lang.String tenor, java.lang.String amountQualifier, java.lang.String amount, java.lang.String marginBand, java.lang.String parameters)
Constructs an RateSubjectInfo based on the provided subscription parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.time.LocalDate
_getFixingDate()
boolean
equals(java.lang.Object o)
java.lang.String
getAmount()
Returns the amount for the subscription, specified as a quantity of the unit returned bygetAmountQualifier()
.java.lang.String
getAmountQualifier()
Returns the qualifier for the amount (e.g.java.lang.String
getBaseCurrency()
Returns the memoized base currency for the subscription.java.lang.String
getBrokenDate()
The settlement date, if the request is for a broken date.java.lang.String
getCurrencyPair()
Returns the currency pair for the subscription.java.time.LocalDate
getFixingDate()
java.lang.String
getMarginBand()
Returns the margin band for the subscription.java.util.Map<java.lang.String,java.lang.String>
getParameters()
java.lang.String
getSubject()
Returns the original subject that was parsed to create this SubjectInfojava.lang.String
getTenor()
Returns the tenor for the subscription.java.lang.String
getTermCurrency()
Returns the memoized term currency for the subscription.int
hashCode()
boolean
isBrokenDate()
Whether the request is for a broken date.boolean
isCoverTrade()
boolean
isNonDeliverable()
boolean
isOrder()
java.lang.String
toString()
-
-
-
Constructor Detail
-
RateSubjectInfo
public RateSubjectInfo(java.lang.String subject, java.lang.String currencyPair, java.lang.String tenor, java.lang.String amountQualifier, java.lang.String amount, java.lang.String marginBand)
Constructs an RateSubjectInfo based on the provided subscription parameters.- Parameters:
subject
- The full requested subjectcurrencyPair
- The requested currency pair.tenor
- The tenor for the subscription.amountQualifier
- The qualifier for the amount, such as Dealt Currency or Unit.amount
- The amount for the subscription. Useful for volume banding.marginBand
- The margin band for the subscription. Sometimes referred to as the price tier.
-
RateSubjectInfo
public RateSubjectInfo(java.lang.String subject, java.lang.String currencyPair, java.lang.String tenor, java.lang.String amountQualifier, java.lang.String amount, java.lang.String marginBand, java.lang.String parameters)
Constructs an RateSubjectInfo based on the provided subscription parameters.- Parameters:
subject
- The full requested subjectcurrencyPair
- The requested currency pair.tenor
- The tenor for the subscription.amountQualifier
- The qualifier for the amount, such as Dealt Currency or Unit.amount
- The amount for the subscription. Useful for volume banding.marginBand
- The margin band for the subscription. Sometimes referred to as the price tier.parameters
- Additional pricing parameters
-
-
Method Detail
-
getCurrencyPair
public java.lang.String getCurrencyPair()
Returns the currency pair for the subscription.- Returns:
- The currency pair in the format
<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".
-
getBaseCurrency
public java.lang.String getBaseCurrency()
Returns the memoized base currency for the subscription.- Returns:
- The base currency for the subscription, which is the first currency in the pair.
-
getTermCurrency
public java.lang.String getTermCurrency()
Returns the memoized term currency for the subscription.- Returns:
- The term currency for the subscription, which is the second currency in the pair.
-
getTenor
public java.lang.String getTenor()
Returns the tenor for the subscription.- Returns:
- The tenor.
-
getBrokenDate
public java.lang.String getBrokenDate()
The settlement date, if the request is for a broken date. Returns null otherwise.- Returns:
- The settlement date, if request was for a broken date.
-
isBrokenDate
public boolean isBrokenDate()
Whether the request is for a broken date.- Returns:
true
if the request is for a broken date,false
otherwise
-
getAmountQualifier
public java.lang.String getAmountQualifier()
Returns the qualifier for the amount (e.g. Dealt Currency or Unit)- Returns:
- The amount qualifier for the subscription (e.g. Dealt Currency or Unit).
-
getAmount
public java.lang.String getAmount()
Returns the amount for the subscription, specified as a quantity of the unit returned bygetAmountQualifier()
. Generally used for determining which volume-banded price the subscription should be provided with.- Returns:
- The amount for the subscription.
-
getMarginBand
public java.lang.String getMarginBand()
Returns the margin band for the subscription. Sometimes referred to as the price tier. This is usually mapped on to the request by Liberator using the permissioning system rather than specified by the client, because clients are usually not in control of (or aware of) which price tier they have been assigned to.- Returns:
- The margin band.
-
getSubject
public java.lang.String getSubject()
Description copied from interface:SubjectInfo
Returns the original subject that was parsed to create this SubjectInfo- Specified by:
getSubject
in interfaceSubjectInfo
- Returns:
- The original subject.
-
getParameters
public java.util.Map<java.lang.String,java.lang.String> getParameters()
-
isNonDeliverable
public boolean isNonDeliverable()
-
isCoverTrade
public boolean isCoverTrade()
-
getFixingDate
public java.time.LocalDate getFixingDate()
-
_getFixingDate
public java.time.LocalDate _getFixingDate()
-
isOrder
public boolean isOrder()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-