Cytoscape 3.0.1 API

org.cytoscape.work.util
Class AbstractBounded<N extends Comparable<N>>

java.lang.Object
  extended by org.cytoscape.work.util.AbstractBounded<N>
Type Parameters:
N - Any type of Number.
Direct Known Subclasses:
BoundedDouble, BoundedFloat, BoundedInteger, BoundedLong

public abstract class AbstractBounded<N extends Comparable<N>>
extends Object

A bounded number object whose bounds values cannot be modified

Author:
Pasteur

Cytoscape Backwards Compatibility (Abstract Class): This class is abstract and meant to 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
AbstractBounded(N lower, N initValue, N upper, boolean lowerStrict, boolean upperStrict)
          Creates a new Bounded object.
 
Method Summary
 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 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBounded

public AbstractBounded(N lower,
                       N initValue,
                       N upper,
                       boolean lowerStrict,
                       boolean upperStrict)
Creates a new Bounded object.

Parameters:
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.
Method Detail

getUpperBound

public N getUpperBound()
Returns the upper limit of the object.

Returns:
the upper bound.

getLowerBound

public N getLowerBound()
Returns the lower limit of the object.

Returns:
the lower bound.

isUpperBoundStrict

public boolean isUpperBoundStrict()
Does the value have to be strictly lower than the upper bound?

Returns:
true if the upper bound is strict, otherwise false.

isLowerBoundStrict

public boolean isLowerBoundStrict()
Does the value have to be strictly greater than the lower bound?

Returns:
true if the lower bound is strict, otherwise false.

getValue

public N getValue()
Returns the value.

Returns:
the current value of the Bounded object.

setValue

public void setValue(N v)
Set the value v as the value of the Bounded Object.

Parameters:
v - the value to be set.

setValue

public abstract void setValue(String s)
Sets the value of the Bounded object.

Parameters:
s - will be converted to the value type of the Bounded object.

Cytoscape 3.0.1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.