com.prowidesoftware.swift.model
Class BIC

java.lang.Object
  extended by com.prowidesoftware.swift.model.BIC

public class BIC
extends java.lang.Object

Helper class to validate a BIC

Since:
3.3
Version:
$Id: BIC.java,v 1.1.1.1 2013/04/10 17:04:50 mgriffa Exp $
Author:
www.prowidesoftware.com

Constructor Summary
BIC()
          Default constructor
BIC(java.lang.String bic)
          Constructor with bic code
 
Method Summary
 java.lang.String getBic()
          Get the bic code of this bic.
 java.lang.String getInvalidCause()
          Get a human readable (english) string that gives information about why the bic was found invalid.
 boolean isValid()
          Validate a bic.
 void setBic(java.lang.String bic)
          Set the bic code for this bic
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BIC

public BIC(java.lang.String bic)
Constructor with bic code

Parameters:
bic - the bic code to use in this bic

BIC

public BIC()
Default constructor

Method Detail

getBic

public java.lang.String getBic()
Get the bic code of this bic. This method does not guarantee that the bic is valid. use isValid()

Returns:
a string with the code

setBic

public void setBic(java.lang.String bic)
Set the bic code for this bic

Parameters:
bic - the bic code

getInvalidCause

public java.lang.String getInvalidCause()
Get a human readable (english) string that gives information about why the bic was found invalid.

Returns:
a string or null if there's no invalid cause set

isValid

public boolean isValid()
Validate a bic. Currently only checks that lenght is 8 or 11 and the country code is valid

Returns:
true if the bic is found to be valid and false in other case
Throws:
java.lang.IllegalStateException - if bic is null