Class ValueRange

java.lang.Object
com.bc.ceres.binding.ValueRange

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

    • ValueRange

      public ValueRange(double min, double max)
    • ValueRange

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

    • 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.
    • toString

      public String toString()
      Overrides:
      toString in class Object