Class ValueRange


  • public class ValueRange
    extends Object
    This class represents a numerical value range.
    Since:
    0.6
    • Constructor Detail

      • ValueRange

        public ValueRange​(double min,
                          double max)
      • ValueRange

        public ValueRange​(double min,
                          double max,
                          boolean minIncluded,
                          boolean maxIncluded)
    • Method Detail

      • getMin

        public double getMin()
      • getMax

        public double getMax()
      • isMinIncluded

        public boolean isMinIncluded()
      • isMaxIncluded

        public boolean isMaxIncluded()
      • hasMin

        public boolean hasMin()
      • hasMax

        public boolean hasMax()
      • contains

        public boolean contains​(double v)
      • parseValueRange

        public static ValueRange parseValueRange​(String text)
                                          throws IllegalArgumentException
        Parses an ValueRange.

        The syntax of a version range is:

           interval ::= ( '[' | '(' ) min ',' max ( ']' | ')' )
           min ::= number | '*'
           max ::= number | '*'
         
        Parameters:
        text - The textual representation of the value range.
        Returns:
        The value range.
        Throws:
        IllegalArgumentException - If the text has an invalid format.