Class FloatControl

    • Constructor Detail

      • FloatControl

        public FloatControl​(IValueAccessor<?> root,
                            String path,
                            IFloatValueDescriptor descriptor)
        Creates a new float control.
        Parameters:
        root - The root object against which the path is evaluated.
        path - The JSON path expression that references the value.
        descriptor - The descriptor that describes the float value being edited.
    • Method Detail

      • getDoubleValue

        public Double getDoubleValue()
        Gets the field's current value as a double. If the value is null, returns 0.
        Returns:
        The field's current value as a double.
      • setDoubleValue

        public void setDoubleValue​(Double value)
        Sets the field's value as a double.
        Parameters:
        value - The new value to set.
      • isHasMax

        public boolean isHasMax()
        Checks whether a maximum value is set.
        Returns:
        true if a maximum value is set, false otherwise.
      • isHasMin

        public boolean isHasMin()
        Checks whether a minimum value is set.
        Returns:
        true if a minimum value is set, false otherwise.
      • setRange

        public void setRange​(com.google.common.collect.Range<Double> range)
        Sets the allowed value range. If the range has no lower bound, the minimum is set to Double.NEGATIVE_INFINITY. If the range has no upper bound, the maximum is set to Double.POSITIVE_INFINITY.
        Parameters:
        range - The allowed value range, or null to allow all values.