Class ContinuousRange<T>

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

public class ContinuousRange<T> extends Object implements Range<T>
Defines a continuous range of values for VisualPropertys.

Module: viewmodel-api

To use this in your app, include the following dependency in your POM:

<dependency>
    <groupId>org.cytoscape</groupId>
    <artifactId>viewmodel-api</artifactId>
</dependency>

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

    Constructors
    Constructor
    Description
    ContinuousRange​(Class<T> type, T min, T max, Boolean includeMin, Boolean includeMax)
    Constructs this ContinuousRange.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the maximum value of this range.
    Returns the minimum value of this range.
    Type of object used in this range.
    boolean
    Returns true if the maximum value is included in this range.
    boolean
    Returns true if the minimum value is included in this range.
    boolean
    inRange​(T value)
    Return true if the given value is in the range defined in this class.
    boolean
    If this range is a set of discrete values, return true.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ContinuousRange

      public ContinuousRange(Class<T> type, T min, T max, Boolean includeMin, Boolean includeMax)
      Constructs this ContinuousRange.
      Parameters:
      type - the type of this ContinuousRange.
      min - the minimum value of this range.
      max - the maximum value of this range.
      includeMin - Whether or not to include the minimum in the range.
      includeMax - Whether or not to include the maximum in the range.
  • Method Details

    • 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.
    • getMin

      public T getMin()
      Returns the minimum value of this range.
      Returns:
      the minimum value of this range.
    • getMax

      public T getMax()
      Returns the maximum value of this range.
      Returns:
      the maximum value of this range.
    • includeMin

      public boolean includeMin()
      Returns true if the minimum value is included in this range.
      Returns:
      true if the minimum value is included in this range.
    • includeMax

      public boolean includeMax()
      Returns true if the maximum value is included in this range.
      Returns:
      true if the maximum value is included in this 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.