Cytoscape 3.0.1 API

org.cytoscape.view.model
Class DiscreteRange<T>

java.lang.Object
  extended by org.cytoscape.view.model.DiscreteRange<T>
Type Parameters:
T - The generic type of this DiscreteRange.
All Implemented Interfaces:
Range<T>

public class DiscreteRange<T>
extends Object
implements Range<T>

Defines a discrete range of values for VisualPropertys.


Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.

Constructor Summary
DiscreteRange(Class<T> type, Set<T> values)
          Constructor for this DiscreteRange.
 
Method Summary
 void addRangeValue(T newValue)
          Add a value to this DiscreteRange.
 Class<T> getType()
          Type of object used in this range.
 boolean inRange(T value)
          Return true if the given value is in the range defined in this class.
 boolean isDiscrete()
          If this range is a set of discrete values, return true.
 Set<T> values()
          Returns a Set of all the values for this DiscreteRange.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscreteRange

public DiscreteRange(Class<T> type,
                     Set<T> values)
Constructor for this DiscreteRange.

Parameters:
type - the type of this DiscreteRange.
values - the initial values of this DiscreteRange.
Method Detail

getType

public Class<T> getType()
Description copied from interface: Range
Type of object used in this range.

Specified by:
getType in interface Range<T>
Returns:
object type.

isDiscrete

public boolean isDiscrete()
Description copied from interface: Range
If this range is a set of discrete values, return true.

Specified by:
isDiscrete in interface Range<T>
Returns:
If discrete, return true.

values

public Set<T> values()
Returns a Set of all the values for this DiscreteRange.

Returns:
a Set of all the values for this DiscreteRange.

addRangeValue

public void addRangeValue(T newValue)
Add a value to this DiscreteRange.

Parameters:
newValue - the value to add to the range.

inRange

public boolean inRange(T value)
Description copied from interface: Range
Return true if the given value is in the range defined in this class.

Specified by:
inRange in interface Range<T>
Parameters:
value - any value to be tested.
Returns:
true if the given value is in the range.

Cytoscape 3.0.1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.