Enum DemandTag.DemandType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<DemandTag.DemandType>
    Enclosing class:
    DemandTag

    public static enum DemandTag.DemandType
    extends java.lang.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 Summary

      Enum Constants 
      Enum Constant Description
      FACTOR
      Demand given in other tag to which a factor applies.
      FACTORS
      Demand given in other tag to which a factors apply.
      FREQUENCIES
      Frequencies that apply to the global time vector.
      TIMED_FACTORS
      Timed factors that apply to demand in another tag.
      TIMED_FREQUENCIES
      Timed frequencies.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static DemandTag.DemandType fromLevelNode​(org.w3c.dom.Node level)
      Returns the demand type based on a LEVEL tag.
      static DemandTag.DemandType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static DemandTag.DemandType[] 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, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

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

      • FACTOR

        public static final DemandTag.DemandType FACTOR
        Demand given in other tag to which a factor applies.
      • FACTORS

        public static final DemandTag.DemandType FACTORS
        Demand given in other tag to which a factors apply.
      • TIMED_FACTORS

        public static final DemandTag.DemandType TIMED_FACTORS
        Timed factors that apply to demand in another tag.
      • FREQUENCIES

        public static final DemandTag.DemandType FREQUENCIES
        Frequencies that apply to the global time vector.
    • Method Detail

      • values

        public static DemandTag.DemandType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DemandTag.DemandType c : DemandTag.DemandType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DemandTag.DemandType 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
      • fromLevelNode

        public static DemandTag.DemandType fromLevelNode​(org.w3c.dom.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