Class GNumberRangeValidator

java.lang.Object
ch.tocco.nice2.validate.api.generic.GNumberRangeValidator
All Implemented Interfaces:
Cloneable

public class GNumberRangeValidator extends Object implements Cloneable
A generic validator for verifying that a Number is within an allowed range.

Bounds may be open or closed, as well as inclusive or exclusive.

  • Constructor Details

    • GNumberRangeValidator

      public GNumberRangeValidator(@Nullable @Nullable Double lowerBound, boolean includeLowerBound, @Nullable @Nullable Double upperBound, boolean includeUpperBound)
  • Method Details

    • getLowerBound

      @Nullable public @Nullable Double getLowerBound()
    • getUpperBound

      @Nullable public @Nullable Double getUpperBound()
    • setLowerBound

      public void setLowerBound(@Nullable @Nullable Double lowerBound)
    • setUpperBound

      public void setUpperBound(@Nullable @Nullable Double upperBound)
    • isIncludeLowerBound

      public boolean isIncludeLowerBound()
    • isIncludeUpperBound

      public boolean isIncludeUpperBound()
    • setIncludeLowerBound

      public void setIncludeLowerBound(boolean includeLowerBound)
    • setIncludeUpperBound

      public void setIncludeUpperBound(boolean includeUpperBound)
    • validate

      public boolean validate(double value)
    • validateMin

      public boolean validateMin(double value)
    • validateMax

      public boolean validateMax(double value)
    • clone

      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException