Class FloatRangeValidator

  • All Implemented Interfaces:
    Validator

    public class FloatRangeValidator
    extends FloatValidator
    A validator for a float value limited to a range.

    Beware that usual math rules for native primitive types (and related approximations) are applied here.

    See Also:
    ComparableRangeValidator
    • Constructor Detail

      • FloatRangeValidator

        public FloatRangeValidator()
      • FloatRangeValidator

        public FloatRangeValidator​(java.util.Locale locale)
      • FloatRangeValidator

        public FloatRangeValidator​(float minValue,
                                   float maxValue)
      • FloatRangeValidator

        public FloatRangeValidator​(java.util.Locale locale,
                                   float minValue,
                                   float maxValue)
    • Method Detail

      • getMinimum

        public float getMinimum()
      • setMinimum

        public void setMinimum​(float minValue)
      • getMaximum

        public float getMaximum()
      • setMaximum

        public void setMaximum​(float maxValue)
      • isValid

        public boolean isValid​(java.lang.String text)
        Description copied from interface: Validator
        Determines if a text value is valid based on the rules of the validator.
        Specified by:
        isValid in interface Validator
        Overrides:
        isValid in class FloatValidator
        Parameters:
        text - The text to test.
        Returns:
        true if the value is valid; false, otherwise.