Enum DemandTag.DemandType

java.lang.Object
java.lang.Enum<DemandTag.DemandType>
org.opentrafficsim.road.network.factory.xml.demand.DemandTag.DemandType
All Implemented Interfaces:
Serializable, Comparable<DemandTag.DemandType>, java.lang.constant.Constable
Enclosing class:
DemandTag

public static enum DemandTag.DemandType
extends Enum<DemandTag.DemandType>
Demand type. Demand may be defined in several tags. For instance, 1 tag may define time and demand, while other tags only specify a factor of this demand applicable to a specific category.

Copyright (c) 2013-2020 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 25 mei 2018
Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Enum Constant Details

  • Method Details

    • values

      public static DemandTag.DemandType[] 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 DemandTag.DemandType valueOf​(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • fromLevelNode

      public static DemandTag.DemandType fromLevelNode​(Node level) throws XmlParserException
      Returns the demand type based on a LEVEL tag. This does not work on FACTOR, as no LEVEL tag should be defined then.
      Parameters:
      level - Node; level of the node
      Returns:
      demand type
      Throws:
      XmlParserException - if the VALUE attribute is missing