com.twitter.common.args.constraints
Class ScalarVerifier<T>

java.lang.Object
  extended by com.twitter.common.args.constraints.ScalarVerifier<T>
All Implemented Interfaces:
Verifier<T>
Direct Known Subclasses:
CanExecuteFileVerifier, CanReadFileVerifier, CanWriteFileVerifier, ExistsFileVerifier, IsDirectoryFileVerifier, NotEmptyIterableVerifier, NotEmptyStringVerifier, NotNegativeNumberVerifier, NotNullVerifier, PositiveNumberVerifier

public abstract class ScalarVerifier<T>
extends Object
implements Verifier<T>

Partial verifier implementation to simplify implementation of scalar verifiers. A scalar verifier is one that requires no information other than the object in order to operate.


Constructor Summary
ScalarVerifier()
           
 
Method Summary
 void verify(T value, Annotation annotation)
          Verifies the value against the annotation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.twitter.common.args.Verifier
toString
 

Constructor Detail

ScalarVerifier

public ScalarVerifier()
Method Detail

verify

public void verify(T value,
                   Annotation annotation)
Description copied from interface: Verifier
Verifies the value against the annotation.

Specified by:
verify in interface Verifier<T>
Parameters:
value - Value that is being applied.
annotation - Annotation that the verifier is checking against.