CreditCardValidator.CreditCardType
private class CreditCardValidator.Mastercard extends java.lang.Object implements CreditCardValidator.CreditCardType
Modifier and Type | Field | Description |
---|---|---|
private static java.lang.String |
PREFIX |
Modifier | Constructor | Description |
---|---|---|
private |
Mastercard() |
Modifier and Type | Method | 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.Copyright (c) 2001-2004 Apache Software Foundation