Package com.bc.ceres.binding
Class ValueRange
java.lang.Object
com.bc.ceres.binding.ValueRange
This class represents a numerical value range.
- Since:
- 0.6
-
Constructor Summary
ConstructorsConstructorDescriptionValueRange
(double min, double max) ValueRange
(double min, double max, boolean minIncluded, boolean maxIncluded) -
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(double v) double
getMax()
double
getMin()
boolean
hasMax()
boolean
hasMin()
boolean
boolean
static ValueRange
parseValueRange
(String text) Parses anValueRange
.toString()
-
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
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.
-
toString
-