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
-
Nested Class Summary
-
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
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 Details
-
FACTOR
Demand given in other tag to which a factor applies. -
FACTORS
Demand given in other tag to which a factors apply. -
TIMED_FACTORS
Timed factors that apply to demand in another tag. -
FREQUENCIES
Frequencies that apply to the global time vector. -
TIMED_FREQUENCIES
Timed frequencies.
-
-
Method Details
-
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
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
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
-