RangeConstraint

public final class RangeConstraint extends RangedConstraint<T>

A constraint that checks whether a value fits the ranged described by expressions such as int32 value = 5 [(range) = "[3..5)], describing a value that is at least 3 and less than 5.

Functions

Link copied to clipboard
public void accept(ConstraintTranslator<? extends Object> visitor)
Accepts the given ConstraintTranslator.
Link copied to clipboard
protected String compileErrorMessage(Range<ComparableNumber> range)

Inherited functions

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 FieldDeclaration field()
Link copied to clipboard
public final V optionValue()
Returns a value that describes the constraint.
Link copied to clipboard
public final Range<ComparableNumber> range()
Link copied to clipboard
public MessageType targetType()
The associated message type.