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>
- 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 Summary
Enum Constants Enum Constant Description FACTORDemand given in other tag to which a factor applies.FACTORSDemand given in other tag to which a factors apply.FREQUENCIESFrequencies that apply to the global time vector.TIMED_FACTORSTimed factors that apply to demand in another tag.TIMED_FREQUENCIESTimed frequencies.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DemandTag.DemandTypefromLevelNode(Node level)Returns the demand type based on a LEVEL tag.static DemandTag.DemandTypevalueOf(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.
-
-
-
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.
-
TIMED_FREQUENCIES
public static final DemandTag.DemandType TIMED_FREQUENCIES
Timed frequencies.
-
-
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(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 nameNullPointerException- 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
-
-