Top Description Fields Constructors Methods
com.dlsc.formsfx.model.validators

public Class CustomValidator<T>

extends RootValidator<T>
Class Inheritance
Known Direct Subclasses
com.dlsc.formsfx.model.validators.DoubleRangeValidator, com.dlsc.formsfx.model.validators.IntegerRangeValidator, com.dlsc.formsfx.model.validators.SelectionLengthValidator, com.dlsc.formsfx.model.validators.StringLengthValidator
Imports
java.util.function.Predicate

A custom validator implementation of the root validator. This validator takes a generic object as an input parameter and allows users to perform any kind of validation.
Authors
Sacha Schmid, Rinesch Murugathas

Field Summary

Modifier and TypeField and Description
private Predicate<T>

Constructor Summary

AccessConstructor and Description
protected
CustomValidator(Predicate<T> callback, String errorMessage)

Method Summary

Modifier and TypeMethod and Description
public static <E> CustomValidator<E>
forPredicate(Predicate<E> callback, String errorMessage)

public ValidationResult
Inherited from com.dlsc.formsfx.model.validators.RootValidator:
createResult

Field Detail

callbackback to summary
private Predicate<T> callback

Constructor Detail

CustomValidatorback to summary
protected CustomValidator(Predicate<T> callback, String errorMessage)

Method Detail

forPredicateback to summary
public static <E> CustomValidator<E> forPredicate(Predicate<E> callback, String errorMessage)
validateback to summary
public ValidationResult validate(T input)

Implements com.dlsc.formsfx.model.validators.Validator.validate.

Annotations
@Override