org.hibernate.validator.constraints.impl
Class LuhnValidator

java.lang.Object
  extended by org.hibernate.validator.constraints.impl.LuhnValidator

public class LuhnValidator
extends Object

Implement the Luhn algorithm (with Luhn key on the last digit). See also http://en.wikipedia.org/wiki/Luhn_algorithm and http://www.merriampark.com/anatomycc.htm.

Author:
Hardy Ferentschik

Constructor Summary
LuhnValidator(int multiplicator)
           
 
Method Summary
 boolean passesLuhnTest(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuhnValidator

public LuhnValidator(int multiplicator)
Method Detail

passesLuhnTest

public boolean passesLuhnTest(String value)


Copyright © 2007-2010 Red Hat Middleware, LLC. All Rights Reserved