Enum FundamentalDiagram.Quantity

java.lang.Object
java.lang.Enum<FundamentalDiagram.Quantity>
org.opentrafficsim.draw.graphs.FundamentalDiagram.Quantity
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FundamentalDiagram.Quantity>, java.lang.constant.Constable
Enclosing class:
FundamentalDiagram

public static enum FundamentalDiagram.Quantity
extends java.lang.Enum<FundamentalDiagram.Quantity>
Quantity enum defining density, flow and speed.

Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Version:
$Revision$, $LastChangedDate$, by $Author$, initial version 16 okt. 2018
Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants 
    Enum Constant Description
    DENSITY
    Density.
    FLOW
    Flow.
    SPEED
    Speed.
  • Method Summary

    Modifier and Type Method Description
    abstract double computeOther​(FundamentalDiagram.Quantity pairing, double thisValue, double pairedValue)
    Compute the value of the 3rd quantity.
    abstract java.lang.String format​(double value)
    Formats a value for status display.
    abstract double getValue​(FundamentalDiagram.FdSource src, int series, int item)
    Get scaled value in presentation unit.
    abstract java.lang.String label()
    Returns an axis label of the quantity.
    static FundamentalDiagram.Quantity valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static FundamentalDiagram.Quantity[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

  • Method Details

    • values

      public static FundamentalDiagram.Quantity[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static FundamentalDiagram.Quantity valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null
    • label

      public abstract java.lang.String label()
      Returns an axis label of the quantity.
      Returns:
      String; axis label of the quantity
    • format

      public abstract java.lang.String format​(double value)
      Formats a value for status display.
      Parameters:
      value - double; value
      Returns:
      String; formatted string including quantity
    • getValue

      public abstract double getValue​(FundamentalDiagram.FdSource src, int series, int item)
      Get scaled value in presentation unit.
      Parameters:
      src - FdSource; the data source
      series - int; series number
      item - int; item number in series
      Returns:
      double; scaled value in presentation unit
    • computeOther

      public abstract double computeOther​(FundamentalDiagram.Quantity pairing, double thisValue, double pairedValue)
      Compute the value of the 3rd quantity.
      Parameters:
      pairing - Quantity; quantity on other axis
      thisValue - double; value of this quantity
      pairedValue - double; value of the paired quantity on the other axis
      Returns:
      double; value of the 3rd quantity