Class AbstractComparableRangeValidator<V extends java.lang.Comparable<V>>

  • Type Parameters:
    V - The value type this validator supports.
    All Implemented Interfaces:
    com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, RangeValidator<V>, Validator<V>
    Direct Known Subclasses:
    DateRangeValidator, DecimalRangeValidator, IntegerRangeValidator, LongRangeValidator

    public abstract class AbstractComparableRangeValidator<V extends java.lang.Comparable<V>>
    extends AbstractRangeValidator<V>
    An abstract implementation of a range validator that handles comparable values. The step value is considered relative either to the minimum value, if available, the maximum value, if available, or zero, in that order or priority.
    Garret Wilson
    See Also:
    • Constructor Detail

      • AbstractComparableRangeValidator

        public AbstractComparableRangeValidator​(V minimum,
                                                V maximum,
                                                V step,
                                                boolean valueRequired)
        Minimum, maximum, step, and value required constructor.
        minimum - The minimum value, inclusive, or null if the range has no lower bound.
        maximum - The maximum value, inclusive, or null if the range has no upper bound.
        step - The step amount, or null if the range has no increment value specified.
        valueRequired - Whether the value must be non-null in order to be considered valid.