Class RFCreditorReferenceCheckDigit

java.lang.Object
org.apache.commons.validator.routines.checkdigit.RFCreditorReferenceCheckDigit
All Implemented Interfaces:
CheckDigit

public final class RFCreditorReferenceCheckDigit extends Object
Creditor Reference Check Digit calculation/validation.

RFCreditorReferenceCheckDigit is very equal to IBAN Check Digit with Prefix RF, which is not an alpha-2 country code. The only difference is that it accepts lower case letter, but handles them as upper case. Implemented as Delegation.

For further information see ISO 11649

Since:
2.10.4
  • Field Details

  • Method Details

    • getInstance

      public static CheckDigit getInstance()
      Gets the singleton instance of this class.
      Returns:
      A singleton instance of the class.
    • calculate

      public String calculate(String code) throws CheckDigitException
      Description copied from interface: CheckDigit
      Calculates the Check Digit for a code.
      Parameters:
      code - The code to calculate the Check Digit for. The string must not include the check digit
      Returns:
      The calculated Check Digit
      Throws:
      CheckDigitException - if an error occurs.
    • isValid

      public boolean isValid(String code)
      Description copied from interface: CheckDigit
      Validates the check digit for the code.
      Parameters:
      code - The code to validate, the string must include the check digit.
      Returns:
      true if the check digit is valid, otherwise false.