T
- The Builder class which is extending this class.public abstract class QuoteBuilder<T> extends Object
Modifier and Type | Field and Description |
---|---|
protected Integer |
allInRateDps |
protected RoundingMode |
allInRoundingMode |
protected Map<String,String> |
fields |
protected boolean |
isAskIndicative |
protected boolean |
isBidIndicative |
protected Map<String,String> |
legFields |
protected String |
midQuoteId
Deprecated.
|
protected String |
midRate |
protected String |
numberOfFractionalPoints |
protected Precision |
precision |
protected String |
riskDate |
protected String |
riskTenor |
protected String |
settlementDate |
protected Integer |
spotRateDps |
protected RoundingMode |
spotRateRoundingMode |
protected Tenor |
tenor |
Constructor and Description |
---|
QuoteBuilder() |
Modifier and Type | Method and Description |
---|---|
T |
addField(String key,
String value)
Adds a field on the quote by name
Remember to add any custom fields to your fields.conf file, or the FX API
will not be able to send them.
|
T |
addLegField(String key,
String value)
Adds a field on the quote by name.
|
T |
allInRateDps(int allInRateDps,
RoundingMode roundingMode)
Sets the number of decimal places that the All In Rate will be formatted with.
|
T |
askIndicative()
Turns the ask side of the quote indicative.
|
T |
bidIndicative()
Turns the bid side of the quote indicative.
|
abstract LegQuote |
build() |
T |
indicative()
Turns the quote into an indicative quote.
|
T |
midRate(String midRate)
Sets the mid rate for the quote.
|
T |
midRate(String midQuoteId,
String midRate)
Deprecated.
Please use
midRate(String) instead. If a mid quote ID is required, it should be added as a
custom field. |
T |
numberOfFractionalPoints(String numberOfFractionalPoints)
Number of decimal places the displayed value of the forward points may have, usually 2 but may be other values.
|
T |
precision(Precision precision)
Sets the precision of the quote.
|
T |
riskDate(String riskDate)
Sets the time option's risk date for the quote.
|
T |
riskTenor(String riskTenor)
Sets the time option's risk tenor for the quote.
|
T |
settlementDate(String settlementDate)
Sets the settlement date for the quote.
|
T |
spotRateDps(int spotRateDps,
RoundingMode roundingMode)
Sets the number of decimal places that the Spot Rate will be formatted with.
|
T |
tenor(Tenor tenor)
Sets the tenor for the quote.
|
@Deprecated protected String midQuoteId
protected String midRate
protected Precision precision
protected String numberOfFractionalPoints
protected boolean isAskIndicative
protected boolean isBidIndicative
protected String settlementDate
protected Tenor tenor
protected String riskDate
protected String riskTenor
protected Integer allInRateDps
protected Integer spotRateDps
protected RoundingMode allInRoundingMode
protected RoundingMode spotRateRoundingMode
public T midRate(String midRate)
midRate
- The mid rate.public T midRate(String midQuoteId, String midRate)
midRate(String)
instead. If a mid quote ID is required, it should be added as a
custom field.midRate
- The mid rate.public T precision(Precision precision)
precision
- The Precision
object which tells the client how to display the rate.public T numberOfFractionalPoints(String numberOfFractionalPoints)
numberOfFractionalPoints
- Number of decimal places the displayed value of the forward points may have, usually 2.public T allInRateDps(int allInRateDps, RoundingMode roundingMode)
allInRateDps
- Number of decimal places to format the All In Rate.roundingMode
- Rounding mode to use if the allInRateDps is less than the number of All In Rate dps. Throws
IllegalArgumentException if null or RoundingMode.UNNECESSARY
public T spotRateDps(int spotRateDps, RoundingMode roundingMode)
spotRateDps
- Number of decimal places to format the Spot Rate.roundingMode
- Rounding mode to use if the spotRateDps is less than the number of Spot Rate dps. Throws
IllegalArgumentException if null or RoundingMode.UNNECESSARY
public T tenor(Tenor tenor)
tenor
- The Tenor
.public T settlementDate(String settlementDate)
settlementDate
- the settlement date.public T riskDate(String riskDate)
riskDate
- the risk date.public T riskTenor(String riskTenor)
riskTenor
- the risk tenor.public T indicative()
bidIndicative()
and askIndicative()
.public T askIndicative()
public T bidIndicative()
public T addField(String key, String value)
key
- The name of the custom field.value
- The value of the custom field.public T addLegField(String key, String value)
key
- The name of the custom field.value
- The value of the custom field.public abstract LegQuote build()
Copyright © 2015 Caplin Systems.