Class SimpleDecimalboxConstraint

All Implemented Interfaces:
Serializable, ClientConstraint, Constraint

public class SimpleDecimalboxConstraint extends SimpleNumberInputConstraint<BigDecimal>
A simple decimalbox constraint.
Since:
10.2.0
Author:
Jamson Chan
See Also:
  • Constructor Details

    • SimpleDecimalboxConstraint

      public SimpleDecimalboxConstraint()
      Constraints a constraint.
    • SimpleDecimalboxConstraint

      public SimpleDecimalboxConstraint(int flags)
      Constraints a constraint.
      Parameters:
      flags - a combination of SimpleConstraint.NO_POSITIVE, SimpleConstraint.NO_NEGATIVE, SimpleConstraint.NO_ZERO, and so on.
    • SimpleDecimalboxConstraint

      public SimpleDecimalboxConstraint(String constraint)
      Constructs a constraint with a list of constraints separated by comma.
      Parameters:
      constraint - a list of constraints separated by comma. Example: no positive, no zero
  • Method Details

    • parseValue

      protected BigDecimal parseValue(String value)
      Description copied from class: SimpleNumberInputConstraint
      Parse the string value to the specified number type T. This method should be implemented by subclasses to convert a string representation of a number to the appropriate numeric type for this constraint.
      Specified by:
      parseValue in class SimpleNumberInputConstraint<BigDecimal>
      Parameters:
      value - the string representation of a number
      Returns:
      the parsed number of type T