Class AbstractComparableRangeValidator<V extends Comparable<V>>

java.lang.Object
com.globalmentor.beans.BoundPropertyObject
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 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.
Author:
Garret Wilson
See Also:
  • Constructor Details

    • AbstractComparableRangeValidator

      public AbstractComparableRangeValidator(V minimum, V maximum, V step, boolean valueRequired)
      Minimum, maximum, step, and value required constructor.
      Parameters:
      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.
  • Method Details