org.springmodules.validation.util.condition
Class NonNullAcceptingTypeSpecificCondition

java.lang.Object
  extended by org.springmodules.validation.util.condition.AbstractCondition
      extended by org.springmodules.validation.util.condition.TypeSpecificCondition
          extended by org.springmodules.validation.util.condition.NonNullAcceptingTypeSpecificCondition
All Implemented Interfaces:
Condition
Direct Known Subclasses:
AbstractDateCondition, AbstractInstantCondition, AbstractStringCondition, IsTrueCondition

public abstract class NonNullAcceptingTypeSpecificCondition
extends TypeSpecificCondition

A base class to all type specific conditions that cannot checkCalendar null values.

Author:
Uri Boness

Constructor Summary
NonNullAcceptingTypeSpecificCondition(java.lang.Class type)
          Constructs a new NonNullAcceptingTypeSpecificCondition with a given support type.
NonNullAcceptingTypeSpecificCondition(java.lang.Class[] types)
          Constructs a new NonNullAcceptingTypeSpecificCondition with given supported types.
 
Method Summary
protected  void beforeObjectChecked(java.lang.Object object)
          See TypeSpecificCondition.beforeObjectChecked(Object).
 
Methods inherited from class org.springmodules.validation.util.condition.AbstractCondition
afterObjectChecked, and, check, doCheck, or
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NonNullAcceptingTypeSpecificCondition

public NonNullAcceptingTypeSpecificCondition(java.lang.Class type)
Constructs a new NonNullAcceptingTypeSpecificCondition with a given support type. Sub-classes should call this constructor if they support only a single object type.

Parameters:
type - The object type this condition supports.

NonNullAcceptingTypeSpecificCondition

public NonNullAcceptingTypeSpecificCondition(java.lang.Class[] types)
Constructs a new NonNullAcceptingTypeSpecificCondition with given supported types. Sub-classes should call this constructor if they support more than one object type.

Parameters:
types - The object types supported by this condition.
Method Detail

beforeObjectChecked

protected void beforeObjectChecked(java.lang.Object object)
See TypeSpecificCondition.beforeObjectChecked(Object). Also checks whether the checked object is null.

Overrides:
beforeObjectChecked in class TypeSpecificCondition
Parameters:
object - The checked object.
Throws:
java.lang.IllegalArgumentException - if the object is either null or is not of the types supported by this condition.


Copyright © 2005. All Rights Reserved.