RangedConstraint

public abstract class RangedConstraint<T> extends FieldConstraint<V>

A constraint that puts a numeric field value into a range.

A field which violates this constraint of its value is out of the range.

Parameters

<T>

value of the option

Functions

Link copied to clipboard
protected abstract String compileErrorMessage(Range<ComparableNumber> range)
Link copied to clipboard
public String errorMessage(FieldContext field)
Produces an error message for the given field validation context.
Link copied to clipboard
public final Range<ComparableNumber> range()

Inherited functions

Link copied to clipboard
public abstract void accept(ConstraintTranslator<? extends Object> visitor)
Accepts the given ConstraintTranslator.
Link copied to clipboard
public final FieldDeclaration field()
Link copied to clipboard
public final V optionValue()
Returns a value that describes the constraint.
Link copied to clipboard
public MessageType targetType()
The associated message type.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard