org.jdesktop.binding.metadata
Interface Validator


public interface Validator

Interface for defining an object which performs validation checks on a value object to determine whether or not it is valid.

Version:
1.0
Author:
Amy Fowler

Method Summary
 boolean validate(java.lang.Object value, java.util.Locale locale, java.lang.String[] error)
          Determines whether or not the specified value is valid.
 

Method Detail

validate

boolean validate(java.lang.Object value,
                 java.util.Locale locale,
                 java.lang.String[] error)
Determines whether or not the specified value is valid. If validation passes, returns true. If validation fails, returns false and an appropriate localized error message will be placed in the first index of the error String array.

Parameters:
value - the value to be validated
locale - Locale object which should be used to encode any returned error messages
error - String array used to return an error message if validation fails
Returns:
boolean indicating whether or not the specified object is valid


Copyright © 2005 Sun Microsystems All Rights Reserved.