Enum FinancialCardIssuer

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<FinancialCardIssuer>

    public enum FinancialCardIssuer
    extends java.lang.Enum<FinancialCardIssuer>
    This class attempts to identify credit card issuers based on patterns in the numbers each vendor issues.
    • Method Detail

      • values

        public static FinancialCardIssuer[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (FinancialCardIssuer c : FinancialCardIssuer.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FinancialCardIssuer valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • identifyByCardNumber

        public static FinancialCardIssuer identifyByCardNumber​(java.lang.String number)
        This method attempts to identify the issuer of a credit card based on a credit card number.
        Parameters:
        number - Number to inspect.
        Returns:
        Issuer if identified, UNKNOWN otherwise.
      • getIssuerName

        public java.lang.String getIssuerName()
        Gets the issuer name.
        Returns:
        Human-friendly issuer name.
      • getRegexString

        public java.lang.String getRegexString()
        Gets the regular expression string.
        Returns:
        Regular expression string.
      • getRegex

        public java.util.regex.Pattern getRegex()
        This method gets the regular expression pattern used to match the card number for this member.
        Returns:
        Regular expression pattern.