Package org.zkoss.zul

Class SimpleNumberInputConstraint<T extends java.lang.Number & java.lang.Comparable<T>>

    • Constructor Detail

      • SimpleNumberInputConstraint

        public SimpleNumberInputConstraint()
        Constructs a constraint.
      • SimpleNumberInputConstraint

        public SimpleNumberInputConstraint​(java.lang.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 Detail

      • getMin

        public T getMin()
        Returns the minimum value.
      • setMin

        public void setMin​(T min)
        Sets the minimum value.
      • getMax

        public T getMax()
        Returns the maximum value.
      • setMax

        public void setMax​(T max)
        Sets the maximum value.
      • parseValue

        protected abstract T parseValue​(java.lang.String value)
        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.
        Parameters:
        value - the string representation of a number
        Returns:
        the parsed number of type T