Class SizePropertyDefinition.Builder

    • Method Detail

      • setLowerLimit

        public void setLowerLimit​(long lowerLimit)
        Set the lower limit in bytes.
        Parameters:
        lowerLimit - The new lower limit (must be >= 0) in bytes.
        Throws:
        IllegalArgumentException - If a negative lower limit was specified, or if the lower limit is greater than the upper limit.
      • setLowerLimit

        public void setLowerLimit​(String lowerLimit)
        Set the lower limit using a string representation of the limit.
        Parameters:
        lowerLimit - The string representation of the new lower limit.
        Throws:
        IllegalArgumentException - If the lower limit could not be parsed, or if a negative lower limit was specified, or the lower limit is greater than the upper limit.
      • setUpperLimit

        public void setUpperLimit​(Long upperLimit)
        Set the upper limit in bytes.
        Parameters:
        upperLimit - The new upper limit in bytes or null if there is no upper limit.
        Throws:
        IllegalArgumentException - If the lower limit is greater than the upper limit.
      • setUpperLimit

        public void setUpperLimit​(String upperLimit)
        Set the upper limit using a string representation of the limit.
        Parameters:
        upperLimit - The string representation of the new upper limit, or null if there is no upper limit.
        Throws:
        IllegalArgumentException - If the upper limit could not be parsed, or if the lower limit is greater than the upper limit.
      • setAllowUnlimited

        public void setAllowUnlimited​(boolean allowUnlimited)
        Specify whether this property definition will allow unlimited values (default is false).
        Parameters:
        allowUnlimited - true if the property will allow unlimited values, or false otherwise.