Package org.cytoscape.work.util
Class BoundedInteger
- java.lang.Object
-
- org.cytoscape.work.util.AbstractBounded<Integer>
-
- org.cytoscape.work.util.BoundedInteger
-
public final class BoundedInteger extends AbstractBounded<Integer>
An Integer object which has low and up bounds.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>
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.
-
-
Constructor Summary
Constructors Constructor Description BoundedInteger(Integer lower, Integer initValue, Integer upper, boolean lowerStrict, boolean upperStrict)
Creates a new Bounded Integer object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
clamp(Integer value)
Clamp the value to be within the range.void
setValue(String s)
Set a new value to the BoundedInteger object-
Methods inherited from class org.cytoscape.work.util.AbstractBounded
addListener, getListeners, getLowerBound, getUpperBound, getValue, isLowerBoundStrict, isUpperBoundStrict, removeListener, setBounds, setLowerBoundStrict, setUpperBoundStrict, setValue
-
-
-
-
Constructor Detail
-
BoundedInteger
public BoundedInteger(Integer lower, Integer initValue, Integer upper, boolean lowerStrict, boolean upperStrict)
Creates a new Bounded Integer object.- Parameters:
lower
- The lower bound value.initValue
- Initial of default value for the Integerupper
- 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 Detail
-
setValue
public void setValue(String s)
Set a new value to the BoundedInteger object- Specified by:
setValue
in classAbstractBounded<Integer>
- Parameters:
s
- String converted into Integer
-
clamp
public Integer clamp(Integer value)
Clamp the value to be within the range.- Specified by:
clamp
in classAbstractBounded<Integer>
-
-