Package org.cytoscape.work.util
Class BoundedDouble
A Double object which has low and up bounds
Cytoscape Backwards Compatibility (Final Class): This class is final and therefore can't be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.
Module: work-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>work-api</artifactId> </dependency>
-
Constructor Summary
ConstructorDescriptionBoundedDouble(Double lower, Double initValue, Double upper, boolean lowerStrict, boolean upperStrict)
Creates a new Bounded Double object. -
Method Summary
Methods inherited from class org.cytoscape.work.util.AbstractBounded
addListener, getListeners, getLowerBound, getUpperBound, getValue, isLowerBoundStrict, isUpperBoundStrict, removeListener, setBounds, setLowerBoundStrict, setUpperBoundStrict, setValue
-
Constructor Details
-
BoundedDouble
public BoundedDouble(Double lower, Double initValue, Double upper, boolean lowerStrict, boolean upperStrict)Creates a new Bounded Double object.- Parameters:
lower
- The lower bound valueinitValue
- Initial of default value for the Doubleupper
- The upper bound valuelowerStrict
- True means that the value cannot be equal to the lower boundupperStrict
- True means that the value cannot be equal to the upper bound
-
-
Method Details
-
setValue
Set a new value to the BoundedDouble object- Specified by:
setValue
in classAbstractBounded<Double>
- Parameters:
s
- String converted into Double
-
clamp
Clamp the value to be within the range.- Specified by:
clamp
in classAbstractBounded<Double>
-