Class IntegerControl

    • Constructor Detail

      • IntegerControl

        public IntegerControl​(IValueAccessor<?> root,
                              String path,
                              IIntegerValueDescriptor descriptor)
        Creates a new integer 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 integer value being edited.
    • Method Detail

      • getLongValue

        public Long getLongValue()
        Gets the field's current value as a long. If the value is null, returns 0.
        Returns:
        The field's current value as a long.
      • setLongValue

        public void setLongValue​(Long value)
        Sets the field's value as a long.
        Parameters:
        value - The new value to set.
      • getMax

        public long getMax()
        Gets the maximum allowed value, if any. If no maximum is set, returns Long.MAX_VALUE.
        Returns:
        The maximum allowed value, or Long.MAX_VALUE if no maximum is set.
      • getMin

        public long getMin()
        Gets the minimum allowed value, if any. If no minimum is set, returns Long.MIN_VALUE.
        Returns:
        The minimum allowed value, or Long.MIN_VALUE if no minimum is 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<Long> range)
        Sets the allowed range of values. If the range has no lower bound, the minimum is set to Long.MIN_VALUE. If the range has no upper bound, the maximum is set to Long.MAX_VALUE.
        Parameters:
        range - The allowed range of values, or null to allow all values.