Package com.bc.ceres.binding
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 Summary
Constructors Constructor Description ValueRange(double min, double max)ValueRange(double min, double max, boolean minIncluded, boolean maxIncluded)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(double v)doublegetMax()doublegetMin()booleanhasMax()booleanhasMin()booleanisMaxIncluded()booleanisMinIncluded()static ValueRangeparseValueRange(String text)Parses anValueRange.StringtoString()
-
-
-
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 anValueRange.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.
-
-