Interface CurrencyContainer
-
- All Superinterfaces:
PatternContainer
- All Known Subinterfaces:
MonetaryAmountContainer
- All Known Implementing Classes:
Field11A
,Field19A
,Field19B
,Field23
,Field32A
,Field32B
,Field32C
,Field32D
,Field32E
,Field32G
,Field32H
,Field32K
,Field32M
,Field32Q
,Field32U
,Field33A
,Field33C
,Field33D
,Field33E
,Field33F
,Field33G
,Field33H
,Field33K
,Field34A
,Field34B
,Field34C
,Field34E
,Field34F
,Field34P
,Field34R
,Field60F
,Field60M
,Field68A
,Field71F
,Field71G
,Field90B
,Field90C
,Field90D
,Field90F
,Field90J
,Field92B
,Field92F
,Field92H
,Field92J
,Field92L
,Field92M
,Field92N
public interface CurrencyContainer extends PatternContainer
Field with a currency component.Note that if a field has a currency and it is optional, and the actual field has not set the optional currency/ies then the call currencies() will return an empty list
- Since:
- 6.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<java.util.Currency>
currencies()
Utility method that creates a Currency for every string returned bycurrencyStrings()
java.util.Currency
currency()
Analog tocurrencyString()
java.lang.String
currencyString()
Get the single currency contained in this field.java.util.List<java.lang.String>
currencyStrings()
Get a list of strings of currencies present in this fieldvoid
initializeCurrencies(java.lang.String cur)
Set the currency of this field.void
initializeCurrencies(java.util.Currency cur)
-
Methods inherited from interface com.prowidesoftware.swift.model.field.PatternContainer
parserPattern, typesPattern
-
-
-
-
Method Detail
-
currencyStrings
java.util.List<java.lang.String> currencyStrings()
Get a list of strings of currencies present in this field- Returns:
- found currency codes or empty list
-
currencyString
java.lang.String currencyString()
Get the single currency contained in this field.- Returns:
- null if no currency is contained - which should never happen, or throws an exception if more than one currency is present in this field.
-
currencies
java.util.List<java.util.Currency> currencies()
Utility method that creates a Currency for every string returned bycurrencyStrings()
- Returns:
- found currencies or empty list
-
currency
java.util.Currency currency()
Analog tocurrencyString()
- See Also:
currencyStrings()
,currencyString()
-
initializeCurrencies
void initializeCurrencies(java.lang.String cur)
Set the currency of this field. If this field contains more than one currency then all currency components will be set. Individual setComponentNN should be used to set only one component of the field.
-
initializeCurrencies
void initializeCurrencies(java.util.Currency cur)
- See Also:
initializeCurrencies(String)
-
-