Class BigIntegerConstraint

java.lang.Object
io.jmix.ui.component.validation.number.BigIntegerConstraint
All Implemented Interfaces:
NumberConstraint

public class BigIntegerConstraint extends Object implements NumberConstraint
  • Field Details

  • Constructor Details

    • BigIntegerConstraint

      public BigIntegerConstraint(BigInteger value)
  • Method Details

    • isMax

      public boolean isMax(long max)
      Specified by:
      isMax in interface NumberConstraint
      Parameters:
      max - max value
      Returns:
      true if value less than or equal to max
    • isMin

      public boolean isMin(long min)
      Specified by:
      isMin in interface NumberConstraint
      Parameters:
      min - min value
      Returns:
      true if value greater than or equal to min
    • isDigits

      public boolean isDigits(int integer, int fraction)
      Specified by:
      isDigits in interface NumberConstraint
      Parameters:
      integer - value of integer part
      fraction - value of fraction part
      Returns:
      true if value within accepted range
    • isDecimalMax

      public boolean isDecimalMax(BigDecimal max, boolean inclusive)
      Specified by:
      isDecimalMax in interface NumberConstraint
      Parameters:
      max - max value
      inclusive - inclusive option, true by default
      Returns:
      true if value less than or equal to max (depends on inclusive option)
    • isDecimalMin

      public boolean isDecimalMin(BigDecimal min, boolean inclusive)
      Specified by:
      isDecimalMin in interface NumberConstraint
      Parameters:
      min - min value
      inclusive - inclusive option, true by default
      Returns:
      true if value less than or equal to min (depends on inclusive option)
    • isNegativeOrZero

      public boolean isNegativeOrZero()
      Specified by:
      isNegativeOrZero in interface NumberConstraint
      Returns:
      true if value is less than or equal to 0
    • isNegative

      public boolean isNegative()
      Specified by:
      isNegative in interface NumberConstraint
      Returns:
      true if value is strictly less than 0
    • isPositiveOrZero

      public boolean isPositiveOrZero()
      Specified by:
      isPositiveOrZero in interface NumberConstraint
      Returns:
      true if value is greater than or equal to 0
    • isPositive

      public boolean isPositive()
      Specified by:
      isPositive in interface NumberConstraint
      Returns:
      true if value is strictly greater than 0
    • isDoubleMax

      public boolean isDoubleMax(Double max, boolean inclusive)
      Specified by:
      isDoubleMax in interface NumberConstraint
      Parameters:
      max - max value
      inclusive - inclusive option, true by default
      Returns:
      true if value less than or equal to max (depends on inclusive option)
    • isDoubleMin

      public boolean isDoubleMin(Double min, boolean inclusive)
      Specified by:
      isDoubleMin in interface NumberConstraint
      Parameters:
      min - min value
      inclusive - inclusive option, true by default
      Returns:
      true if value less than or equal to min (depends on inclusive option)
    • compareValueWith

      protected int compareValueWith(long val)
    • compareValueWith

      protected int compareValueWith(BigDecimal val)