org.apache.wicket.validation
Interface IValidatable<T>

Type Parameters:
T - type of value
All Known Subinterfaces:
IModelAwareValidatable<T>
All Known Implementing Classes:
Validatable

public interface IValidatable<T>

Interface representing any object that can be validated.

Since:
1.2.6
Author:
Igor Vaynberg (ivaynberg)

Method Summary
 void error(IValidationError error)
          Reports an error against this IValidatable's value.
 T getValue()
          Retrieves the value to be validated.
 boolean isValid()
          Queries the current state of this IValidatable instance.
 

Method Detail

getValue

T getValue()
Retrieves the value to be validated.

Returns:
the value to be validated

error

void error(IValidationError error)
Reports an error against this IValidatable's value. Multiple errors can be reported by calling this method multiple times.

Parameters:
error - an IValidationError to be reported

isValid

boolean isValid()
Queries the current state of this IValidatable instance. IValidatables should assume they are valid until error(IValidationError) is called.

Returns:
true if the object is in a valid state, false if otherwise


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.