code: public static Iban valueOf(final String iban, final IbanFormat format) throws IbanFormatException,
              InvalidCheckDigitException, UnsupportedCountryException {
          switch (format) {
              case Default:
                  final String ibanWithoutSpaces = iban.replace(" ", "");
                  final Iban ibanObj = valueOf(ibanWithoutSpaces);
                  if(ibanObj.toFormattedString().equals(iban)) {
                      return ibanObj;
                  }
                  throw new IbanFormatException(IBAN_FORMATTING,
                          String.format("Iban must be formatted using 4 characters and space combination. " +
                                  "Instead of [%s]", iban));
              default:
                  return valueOf(iban);
          }
      }
docs: Returns an Iban object holding the value of the specified String.
  
  @param iban the String to be parsed.
  @param format the format of the Iban.
  @return an Iban object holding the value represented by the string argument.
  @throws IbanFormatException if the String doesn't contain parsable Iban
  InvalidCheckDigitException if Iban has invalid check digit
  UnsupportedCountryException if Iban's Country is not supported.