N - Any type of Number.public abstract class AbstractBounded<N extends Comparable<N>> extends Object
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 and Description |
|---|
AbstractBounded(N lower,
N initValue,
N upper,
boolean lowerStrict,
boolean upperStrict)
Creates a new Bounded object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(BoundedChangeListener<N> changeListener)
Adds a listener that will listen for changes to this object
|
abstract N |
clamp(N value)
Clamps the value of the
Bounded object. |
N |
getLowerBound()
Returns the lower limit of the object.
|
N |
getUpperBound()
Returns the upper limit of the object.
|
N |
getValue()
Returns the value.
|
boolean |
isLowerBoundStrict()
Does the value have to be strictly greater than the lower bound?
|
boolean |
isUpperBoundStrict()
Does the value have to be strictly lower than the upper bound?
|
void |
removeListener(BoundedChangeListener<N> changeListener)
Removes a listener from the list that will listen for changes to this object
|
void |
setBounds(N lower,
N upper)
Set the upper bound (
upper) and
lower bound (lower) of the Bounded Object. |
void |
setLowerBoundStrict(boolean lowerStrict)
Set the lower bound strict policy to
lowerStrict. |
void |
setUpperBoundStrict(boolean upperStrict)
Set the upper bound strict policy to
upperStrict. |
void |
setValue(N v)
Set the value
v as the value of the Bounded Object. |
abstract void |
setValue(String s)
Sets the value of the
Bounded object. |
public AbstractBounded(N lower, N initValue, N upper, boolean lowerStrict, boolean upperStrict)
lower - The lower bound value.initValue - The initial value.upper - The upper bound value.lowerStrict - True means that the value cannot be equal to the lower bound.upperStrict - True means that the value cannot be equal to the upper bound.public N getUpperBound()
public N getLowerBound()
public boolean isUpperBoundStrict()
public boolean isLowerBoundStrict()
public N getValue()
Bounded object.public void setUpperBoundStrict(boolean upperStrict)
upperStrict.upperStrict - the upper bound strict policy to be setpublic void setLowerBoundStrict(boolean lowerStrict)
lowerStrict.lowerStrict - the lower bound strict policy to be setpublic void setBounds(N lower, N upper)
upper) and
lower bound (lower) of the Bounded Object.lower - the lower bound to be set.upper - the upper bound to be set.public void setValue(N v)
v as the value of the Bounded Object.v - the value to be set.public abstract void setValue(String s)
Bounded object.s - will be converted to the value type of the Bounded object.public void addListener(BoundedChangeListener<N> changeListener)
changeListener - listener objectpublic void removeListener(BoundedChangeListener<N> changeListener)
changeListener - listener objectCopyright 2011 Cytoscape Consortium. All rights reserved.