org.databene.commons.validator
Class UniqueValidator<E>

java.lang.Object
  extended by org.databene.commons.validator.UniqueValidator<E>
All Implemented Interfaces:
Resettable, Validator<E>

public class UniqueValidator<E>
extends java.lang.Object
implements Validator<E>, Resettable

Validator implementation that requires each argument of consecutive calls to the valid() method to be unique.

Created: 20.11.2007 09:55:16

Author:
Volker Bergmann

Constructor Summary
UniqueValidator()
           
 
Method Summary
 void reset()
           
 java.lang.String toString()
           
 boolean valid(E object)
          Checks if an object is valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UniqueValidator

public UniqueValidator()
Method Detail

valid

public boolean valid(E object)
Description copied from interface: Validator
Checks if an object is valid.

Specified by:
valid in interface Validator<E>
Parameters:
object - the object to validate
Returns:
true if the specified object is valid, otherwise false

reset

public void reset()
Specified by:
reset in interface Resettable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010. All Rights Reserved.