Version 4.10.0

hirondelle.web4j.model
Interface Validator


public interface Validator

Validate a field in a Model Object.

Model Objects are not required to use this interface when validating data, but it is often convenient to do so. In combination with Check, this interface is meant to reduce code repetition related to validation.

This interface is appropriate only for checks on a single field.

Please see Check for more information, and for some useful implementations.


Method Summary
 boolean isValid(Object aObject)
          Return true only if aObject passes this validation.
 

Method Detail

isValid

boolean isValid(Object aObject)
Return true only if aObject passes this validation.

aObject is a field in some Model Object, being validated in a constructor. If the field is a primitive value (such as int), then it must be converted by the caller into a corresponding wrapper object (such as Integer).

Parameters:
aObject - may be null.

Version 4.10.0

Copyright Hirondelle Systems. Published October 19, 2013 - User Guide - All Docs.