public class BIC
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
branch |
static java.lang.String |
PARTNER_PREFIX
Constant value with which all partner bics start
|
static java.lang.String |
TEST12
Fake Logical terminal address for testing,
consisting of a fake "test & training" BIC of 12 chars
(including the terminal identification)
|
static java.lang.String |
TEST8
Fake "test & training" BIC of 8 chars for testing
|
| Constructor and Description |
|---|
BIC()
Default constructor
|
BIC(java.lang.String bic)
Constructor with BIC code.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
country()
Gets the 2 chars country code of the BIC, which are the 5th and 6th characters
|
java.lang.String |
distinguishedName()
Returns the Distinguished Name (DN) for this BIC.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getBic()
Deprecated.
use getBic8 or getBic11 instead
|
java.lang.String |
getBic11()
Returns the BIC code with 11 characters composed by the first 8 characters of the BIC code,
plus the branch code, dropping the logical terminal identifier at position 9 if present, and
also padding with a default XXX branch if necessary.
|
java.lang.String |
getBic8()
Returns the first 8 characters of the BIC code.
|
java.lang.String |
getBranch()
It returns the last three that conform the branch or null if branch is not present.
|
java.lang.String |
getInvalidCause()
Get a human readable (english) string that gives information about why the BIC was found invalid.
|
java.lang.String |
getSubtype() |
int |
hashCode() |
java.lang.String |
institution()
Gets the first 4 characters of the BIC; corresponding to the institution code
|
boolean |
isLive()
Returns true if the BIC is live (connected and not test & training) on the network.
|
boolean |
isNonLive()
Returns true if the BIC is not live (not connected) on the network.
|
boolean |
isTestAndTraining()
Returns true if the BIC is a Test & Training BIC code.
|
boolean |
isValid()
Validates a BIC structure.
|
protected void |
parse(java.lang.String bic)
Parse the given string into the corresponding object attributes.
|
void |
setBic(java.lang.String bic)
Deprecated.
use the constructor passing the string as parameter
|
void |
setSubtype(java.lang.String subtype) |
java.lang.String |
toString() |
public static final transient java.lang.String TEST8
public static final transient java.lang.String TEST12
SwiftBlock1.getLogicalTerminal(),
Constant Field Valuespublic static final java.lang.String PARTNER_PREFIX
protected java.lang.String branch
public BIC(java.lang.String bic)
bic - the BIC code to use in this BICsubclass to deal with 12 characters length LT identifierspublic BIC()
protected void parse(java.lang.String bic)
bic - @Deprecated @ProwideDeprecated(phase4=_2018) public java.lang.String getBic()
isValid()@Deprecated @ProwideDeprecated(phase4=_2018) public void setBic(java.lang.String bic)
bic - the BIC codepublic java.lang.String getInvalidCause()
null if there's no invalid cause setpublic boolean isValid()
true if the BIC is found to be valid and false in other casejava.lang.IllegalStateException - if BIC is nullpublic java.lang.String getBranch()
public java.lang.String getSubtype()
public void setSubtype(java.lang.String subtype)
public boolean isTestAndTraining()
public boolean isNonLive()
isLive()public boolean isLive()
isNonLive()public java.lang.String getBic8()
public java.lang.String getBic11()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String country()
public java.lang.String institution()
public java.lang.String distinguishedName()
public java.lang.String toString()
toString in class java.lang.Object