org.apache.commons.validator
Class CreditCardValidator.Mastercard

java.lang.Object
  extended by org.apache.commons.validator.CreditCardValidator.Mastercard
All Implemented Interfaces:
CreditCardValidator.CreditCardType
Enclosing class:
CreditCardValidator

private class CreditCardValidator.Mastercard
extends java.lang.Object
implements CreditCardValidator.CreditCardType


Field Summary
private static java.lang.String PREFIX
           
 
Constructor Summary
private CreditCardValidator.Mastercard()
           
 
Method Summary
 boolean matches(java.lang.String card)
          Returns true if the card number matches this type of credit card.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFIX

private static final java.lang.String PREFIX
See Also:
Constant Field Values
Constructor Detail

CreditCardValidator.Mastercard

private CreditCardValidator.Mastercard()
Method Detail

matches

public boolean matches(java.lang.String card)
Description copied from interface: CreditCardValidator.CreditCardType
Returns true if the card number matches this type of credit card. Note that this method is not responsible for analyzing the general form of the card number because 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.

Specified by:
matches in interface CreditCardValidator.CreditCardType
Parameters:
card - The card number, never null.
Returns:
true if the number matches.


Copyright (c) 2001-2004 Apache Software Foundation