org.millstone.base.data
Interface Validator.Suggestive

All Superinterfaces:
Validator
Enclosing interface:
Validator

public static interface Validator.Suggestive
extends Validator

Adds the proposing functionality to a Validator. A Suggestive validator can propose a valid value for the object it is attached to validate. This way the Validatable object may avoid situations where it contains a value that could lead to a error.

Since:
3.0
Version:
3.0.3
Author:
IT Mill Ltd.

Nested Class Summary
 
Nested classes inherited from class org.millstone.base.data.Validator
Validator.InvalidValueException, Validator.Suggestive
 
Method Summary
 java.lang.Object suggestValidValue(java.lang.Object proposedValue)
          Suggest another value that can be used instead of proposedValue if it is invalid.
 
Methods inherited from interface org.millstone.base.data.Validator
isValid, validate
 

Method Detail

suggestValidValue

public java.lang.Object suggestValidValue(java.lang.Object proposedValue)
Suggest another value that can be used instead of proposedValue if it is invalid. If it is valid in the opinion of this validator, however, it is returned as is.

Parameters:
proposedValue - Originally proposed value that could be invalid.
Returns:
Suggested value that's not invalid against this validator


Copyright © 2000,2001,2002 IT Mill Ltd. All Rights Reserved.