Tabnine Logo
IbanUtil
Code IndexAdd Tabnine to your IDE (free)

How to use
IbanUtil
in
de.knightsoftnet.validators.shared.util

Best Java code snippets using de.knightsoftnet.validators.shared.util.IbanUtil (Showing top 20 results out of 315)

origin: de.knightsoft-net/gwt-mt-widgets

@Override
public void formatValue(final ValueWithPos<String> pvalue, final boolean fireEvents) {
 setTextWithPos(IbanUtil.ibanFormatWithPos(pvalue), fireEvents);
}
origin: ManfredTremmel/gwt-bean-validators

/**
 * get account number of iban.
 *
 * @param pstring string with iban
 * @return account number
 */
public static String getAccountNumberOfIban(final String pstring) {
 final String compressedIban = ibanCompress(pstring);
 final String country = StringUtils.substring(compressedIban, 0, 2);
 final IbanLengthDefinition length = IBAN_LENGTH_MAP.ibanLengths().get(country);
 return length == null ? null
   : StringUtils.substring(compressedIban, length.getAccountNumberStart(),
     length.getAccountNumberEnd());
}
origin: de.knightsoft-net/gwt-mt-widgets

@Override
public String formatValueSynchron(final String pvalue) {
 return IbanUtil.ibanFormat(pvalue);
}
origin: de.knightsoft-net/gwt-mt-widgets

@Override
protected void setTextWithPos(final ValueWithPos<String> formatedEntry,
  final boolean fireEvents) {
 super.setTextWithPos(formatedEntry, fireEvents);
 if (bicInput != null && StringUtils.isEmpty(bicInput.getValue())) {
  final String bic = IbanUtil.getBicOfIban(formatedEntry.getValue());
  if (StringUtils.isNotEmpty(bic)) {
   bicInput.setValue(bic);
  }
 }
}
origin: de.knightsoft-net/mt-bean-validators

/**
 * test formating iban.
 */
@Test
public void testIbanFormat() {
 Assert.assertNull("iban format should be null", IbanUtil.ibanFormatWithPos(null));
 for (final Entry<String, String> entry : IbanUtilTestCases.getFormatCases().entrySet()) {
  Assert.assertEquals("iban format failed", entry.getKey(),
    IbanUtil.ibanFormat(entry.getValue()));
 }
}
origin: de.knightsoft-net/mt-bean-validators

 /**
  * get bic of iban.
  *
  * @param pstring string with iban
  * @return bic
  */
 public static String getBicOfIban(final String pstring) {
  final String country = StringUtils.substring(pstring, 0, 2);
  final String bankNumber = getBankNumberOfIban(pstring);
  return BANK_ACCOINT_BIC_MAP.bankAccounts().get(new CountryBankAccountData(country, bankNumber));
 }
}
origin: ManfredTremmel/gwt-bean-validators

@Override
protected void setTextWithPos(final ValueWithPos<String> formatedEntry) {
 super.setTextWithPos(formatedEntry);
 if (bicInput != null && StringUtils.isEmpty(bicInput.getValue())) {
  final String bic = IbanUtil.getBicOfIban(formatedEntry.getValue());
  if (StringUtils.isNotEmpty(bic)) {
   bicInput.setValue(bic);
  }
 }
}
origin: ManfredTremmel/gwt-bean-validators

/**
 * test formating iban.
 */
@Test
public void testIbanFormat() {
 Assert.assertNull("iban format should be null", IbanUtil.ibanFormatWithPos(null));
 for (final Entry<String, String> entry : IbanUtilTestCases.getFormatCases().entrySet()) {
  Assert.assertEquals("iban format failed", entry.getKey(),
    IbanUtil.ibanFormat(entry.getValue()));
 }
}
origin: ManfredTremmel/gwt-bean-validators

 /**
  * get bic of iban.
  *
  * @param pstring string with iban
  * @return bic
  */
 public static String getBicOfIban(final String pstring) {
  final String country = StringUtils.substring(pstring, 0, 2);
  final String bankNumber = getBankNumberOfIban(pstring);
  return BANK_ACCOINT_BIC_MAP.bankAccounts().get(new CountryBankAccountData(country, bankNumber));
 }
}
origin: de.knightsoft-net/mt-bean-validators

 /**
  * test iban to bic transformation.
  */
 @Test
 public void testIbanToBic() {
  Assert.assertNull("iban to bic should be null", IbanUtil.getBicOfIban(null));
  for (final Entry<String, String> entry : IbanUtilTestCases.getIbanToBic().entrySet()) {
   Assert.assertEquals("iban to bic failed", entry.getValue(),
     IbanUtil.getBicOfIban(entry.getKey()));
  }
 }
}
origin: ManfredTremmel/gwt-bean-validators

@Override
public void formatValue(final ValueWithPos<String> pvalue) {
 setTextWithPos(IbanUtil.ibanFormatWithPos(pvalue));
}
origin: de.knightsoft-net/mt-bean-validators

/**
 * get bank number of iban.
 *
 * @param pstring string with iban
 * @return bank number
 */
public static String getBankNumberOfIban(final String pstring) {
 final String compressedIban = ibanCompress(pstring);
 final String country = StringUtils.substring(compressedIban, 0, 2);
 final IbanLengthDefinition length = IBAN_LENGTH_MAP.ibanLengths().get(country);
 return length == null ? null
   : StringUtils.substring(compressedIban, length.getBankNumberStart(),
     length.getBankNumberEnd());
}
origin: ManfredTremmel/gwt-bean-validators

 /**
  * test iban to bic transformation.
  */
 @Test
 public void testIbanToBic() {
  Assert.assertNull("iban to bic should be null", IbanUtil.getBicOfIban(null));
  for (final Entry<String, String> entry : IbanUtilTestCases.getIbanToBic().entrySet()) {
   Assert.assertEquals("iban to bic failed", entry.getValue(),
     IbanUtil.getBicOfIban(entry.getKey()));
  }
 }
}
origin: ManfredTremmel/gwt-bean-validators

/**
 * format iban to four character blocks.
 *
 * @param pstring string to format
 * @return formated string
 */
public static String ibanFormat(final String pstring) {
 if (pstring == null) {
  return null;
 }
 final ValueWithPos<String> formatedValue = ibanFormatWithPos(new ValueWithPos<>(pstring, -1));
 return formatedValue.getValue();
}
origin: de.knightsoft-net/mt-bean-validators

/**
 * get account number of iban.
 *
 * @param pstring string with iban
 * @return account number
 */
public static String getAccountNumberOfIban(final String pstring) {
 final String compressedIban = ibanCompress(pstring);
 final String country = StringUtils.substring(compressedIban, 0, 2);
 final IbanLengthDefinition length = IBAN_LENGTH_MAP.ibanLengths().get(country);
 return length == null ? null
   : StringUtils.substring(compressedIban, length.getAccountNumberStart(),
     length.getAccountNumberEnd());
}
origin: ManfredTremmel/gwt-bean-validators

final String valueBic =
  BeanPropertyReaderUtil.getNullSaveStringProperty(pvalue, this.fieldBic);
final String bicOfIban = IbanUtil.getBicOfIban(valueIban);
origin: de.knightsoft-net/mt-bean-validators

/**
 * format iban to four character blocks.
 *
 * @param pstring string to format
 * @return formated string
 */
public static String ibanFormat(final String pstring) {
 if (pstring == null) {
  return null;
 }
 final ValueWithPos<String> formatedValue = ibanFormatWithPos(new ValueWithPos<>(pstring, -1));
 return formatedValue.getValue();
}
origin: ManfredTremmel/gwt-bean-validators

/**
 * get bank number of iban.
 *
 * @param pstring string with iban
 * @return bank number
 */
public static String getBankNumberOfIban(final String pstring) {
 final String compressedIban = ibanCompress(pstring);
 final String country = StringUtils.substring(compressedIban, 0, 2);
 final IbanLengthDefinition length = IBAN_LENGTH_MAP.ibanLengths().get(country);
 return length == null ? null
   : StringUtils.substring(compressedIban, length.getBankNumberStart(),
     length.getBankNumberEnd());
}
origin: de.knightsoft-net/mt-bean-validators

final String valueBic =
  BeanPropertyReaderUtil.getNullSaveStringProperty(pvalue, this.fieldBic);
final String bicOfIban = IbanUtil.getBicOfIban(valueIban);
origin: de.knightsoft-net/mt-bean-validators

/**
 * test formating iban with position.
 */
@Test
public void testIbanFormatWithPos() {
 Assert.assertNull("iban format should be null", IbanUtil.ibanFormatWithPos(null));
 for (final Entry<ValueWithPos<String>, ValueWithPos<String>> entry : IbanUtilTestCases
   .getFormatWithPosCases().entrySet()) {
  Assert.assertEquals("iban format failed", entry.getKey(),
    IbanUtil.ibanFormatWithPos(entry.getValue()));
 }
}
de.knightsoftnet.validators.shared.utilIbanUtil

Javadoc

Iban Util, format and compress ibans.

Most used methods

  • getBicOfIban
    get bic of iban.
  • ibanFormatWithPos
    format iban to four character blocks.
  • ibanCompress
    compress iban, remove all blanks inside.
  • ibanFormat
    format iban to four character blocks.
  • getBankNumberOfIban
    get bank number of iban.

Popular in Java

  • Finding current android device location
  • getSystemService (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now