private static class CreditCardValidator.Visa extends java.lang.Object implements CreditCardValidator.CreditCardType
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
PREFIX |
Modifier | Constructor and Description |
---|---|
private |
Visa() |
Modifier and Type | Method and Description |
---|---|
boolean |
matches(java.lang.String card)
Returns true if the card number matches this type of credit
card.
|
private static final java.lang.String PREFIX
public boolean matches(java.lang.String card)
CreditCardValidator.CreditCardType
CreditCardValidator
performs those checks before
calling this method. It is generally only required to valid the
length and prefix of the number to determine if it's the correct
type.matches
in interface CreditCardValidator.CreditCardType
card
- The card number, never null.