Codota Logo
IbanUtil
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
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

  • Reading from database using SQL prepared statement
  • runOnUiThread (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now