Enum IndexValidators
- All Implemented Interfaces:
Serializable, Comparable<IndexValidators>, java.lang.constant.Constable, Validator<Integer[]>
An enumeration of validator factories for commonly needed forms of
selection validaton. This is useful for validating the user selection in components
such as a
JList or a number of AbstractButtons.- Author:
- Tim Boudreau, Hugo Heden
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionThe type of the model object which can be validated.voidValidate the passed model.static IndexValidatorsReturns the enum constant of this type with the specified name.static IndexValidators[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
REQUIRE_SELECTION
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
validate
Description copied from interface:ValidatorValidate the passed model. If the component is invalid, this method shall add problems to the passed list. -
modelType
Description copied from interface:ValidatorThe type of the model object which can be validated. Necessary due to limitations of the Java implementation of generics, so that model conversions can be done at runtime, and declaratively registered ValidationListeners can be matched with Validator types. The return value of this method is expected to remain constant throughout the life of this validator.
-