public class SwiftFormatUtils
extends java.lang.Object
Constructor and Description |
---|
SwiftFormatUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getBIC(BIC bic)
Gets the code from the parameter BIC.
|
static BIC |
getBIC(java.lang.String code) |
static java.lang.String |
getCurrency(java.util.Currency currency)
Gets the currency code from the parameter Currency.
|
static java.util.Currency |
getCurrency(java.lang.String code) |
static java.lang.String |
getDate1(java.util.Calendar date)
Parses a Calendar object into a DATE1 string.
|
static java.util.Calendar |
getDate1(java.lang.String strDate)
Parses a DATE1 string (accept dates in format MMDD) into a Calendar object.
|
static java.lang.String |
getDate2(java.util.Calendar date)
Parses a Calendar object into a DATE2 string.
|
static java.util.Calendar |
getDate2(java.lang.String strDate)
Parses a DATE2 string (accept dates in format YYMMDD) into a Calendar object.
|
static java.lang.String |
getDate3(java.util.Calendar date)
Parses a Calendar object into a DATE1 string.
|
static java.util.Calendar |
getDate3(java.lang.String strDate)
Parses a DATE3 string (accept dates in format YYMM) into a Calendar object.
|
static java.lang.String |
getDate4(java.util.Calendar date)
Parses a Calendar object into a DATE1 string.
|
static java.util.Calendar |
getDate4(java.lang.String strDate)
Parses a DATE4 string (accept dates in format YYYYMMDD) into a Calendar object.
|
static java.util.Calendar |
getHhmm(java.lang.String hhmm) |
static java.lang.String |
getNumber(java.lang.Number number)
Parses a Number into a SWIFT string number ####,## where trunked zero decimals and mandatory decimal separator.
|
static java.lang.Number |
getNumber(java.lang.String amount)
Parses a value into a java Number (BigDecimal) using the comma for decimal separator.
|
static java.lang.String |
getOffset(java.util.Calendar date)
Parses a Calendar object into a offset string.
|
static java.util.Calendar |
getOffset(java.lang.String string) |
static java.lang.Character |
getSign(java.lang.String string) |
static java.lang.String |
getTime2(java.util.Calendar date)
Parses a Calendar object into a TIME2 string.
|
static java.util.Calendar |
getTime2(java.lang.String hhmmss) |
static java.lang.String |
getTime3(java.util.Calendar date)
Parses a Calendar object into a TIME3 string.
|
static java.util.Calendar |
getTime3(java.lang.String hhmmss) |
static java.lang.String |
getYear(java.util.Calendar date)
Parses a Calendar object into a YYYY string.
|
static java.util.Calendar |
getYear(java.lang.String strDate)
Parses a YEAR string (accept dates in format YYYY) into a Calendar object.
|
public static java.util.Calendar getDate2(java.lang.String strDate)
strDate
- string to parsenull
if the argument did not matched the expected date formatpublic static java.lang.String getDate2(java.util.Calendar date)
date
- Calendar to parsenull
if the calendar is nullpublic static java.util.Calendar getDate1(java.lang.String strDate)
strDate
- string to parsenull
if the argument did not matched the expected date formatpublic static java.lang.String getDate1(java.util.Calendar date)
date
- Calendar to parsenull
if the calendar is nullpublic static java.util.Calendar getDate3(java.lang.String strDate)
strDate
- string to parsenull
if the argument did not matched the expected date formatpublic static java.lang.String getDate3(java.util.Calendar date)
date
- Calendar to parsenull
if the calendar is nullpublic static java.util.Calendar getDate4(java.lang.String strDate)
strDate
- string to parsenull
if the argument did not matched the expected date formatpublic static java.lang.String getDate4(java.util.Calendar date)
date
- Calendar to parsenull
if the calendar is nullpublic static java.util.Calendar getYear(java.lang.String strDate)
strDate
- string to parsenull
if the argument did not matched the expected date formatpublic static java.lang.String getYear(java.util.Calendar date)
date
- Calendar to parsenull
if the calendar is nullpublic static java.lang.Number getNumber(java.lang.String amount)
amount
- to parsenull
if the number could not be parsedpublic static java.lang.String getNumber(java.lang.Number number)
number
- to parsenull
if the number is nullpublic static java.util.Calendar getHhmm(java.lang.String hhmm)
hhmm
- hour and minutespublic static java.util.Calendar getTime2(java.lang.String hhmmss)
hhmmss
- hour, minutes and secondspublic static java.lang.String getTime2(java.util.Calendar date)
date
- Calendar to parsenull
if the calendar is nullpublic static java.util.Calendar getTime3(java.lang.String hhmmss)
hhmmss
- hour, minutes and secondspublic static java.lang.String getTime3(java.util.Calendar date)
date
- Calendar to parsenull
if the calendar is nullpublic static java.lang.Character getSign(java.lang.String string)
string
- with a single characterpublic static java.util.Calendar getOffset(java.lang.String string)
string
- with an offsetpublic static java.lang.String getOffset(java.util.Calendar date)
date
- Calendar to parsenull
if the calendar is nullpublic static java.util.Currency getCurrency(java.lang.String code)
code
- string with a currency codepublic static java.lang.String getCurrency(java.util.Currency currency)
currency
- Currency to usepublic static BIC getBIC(java.lang.String code)
code
- string with a BIC codepublic static java.lang.String getBIC(BIC bic)
bic
- BIC to use