Package org.goplanit.utils.mode
Enum PredefinedModeType
- java.lang.Object
-
- java.lang.Enum<PredefinedModeType>
-
- org.goplanit.utils.mode.PredefinedModeType
-
- All Implemented Interfaces:
Serializable
,Comparable<PredefinedModeType>
public enum PredefinedModeType extends Enum<PredefinedModeType>
While PLANit allows the user to come up with its own modes. It does suggest a number of predefined modes to use. This is especially useful to get started quickly or when one wants to use the PLANit memory model to convert networks of one type to another with PLANit as the intermediary memory model, in which case some kind of mapping between known modes is required. When a custom mode is used, i.e., the mode factory is not used to create one of the defaults, the type of the mode is automatically set to CUSTOM- Author:
- markr
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BICYCLE
BUS
CAR
CAR_HIGH_OCCUPANCY
CAR_SHARE
CUSTOM
FERRY
GOODS_VEHICLE
HEAVY_GOODS_VEHICLE
LARGE_HEAVY_GOODS_VEHICLE
LIGHTRAIL
MOTOR_BIKE
PEDESTRIAN
SUBWAY
TRAIN
TRAM
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PredefinedModeType
create(String predefinedModeTypeValue)
convert string to enum.static EnumSet<PredefinedModeType>
getPredefinedModeTypes()
collect all predefined mode typesstatic EnumSet<PredefinedModeType>
getPredefinedModeTypesWithout(PredefinedModeType... excludedModeTypes)
Collect all predefined mode typesString
value()
static PredefinedModeType
valueOf(String name)
Returns the enum constant of this type with the specified name.static PredefinedModeType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BICYCLE
public static final PredefinedModeType BICYCLE
-
CUSTOM
public static final PredefinedModeType CUSTOM
-
CAR
public static final PredefinedModeType CAR
-
CAR_SHARE
public static final PredefinedModeType CAR_SHARE
-
CAR_HIGH_OCCUPANCY
public static final PredefinedModeType CAR_HIGH_OCCUPANCY
-
BUS
public static final PredefinedModeType BUS
-
PEDESTRIAN
public static final PredefinedModeType PEDESTRIAN
-
MOTOR_BIKE
public static final PredefinedModeType MOTOR_BIKE
-
SUBWAY
public static final PredefinedModeType SUBWAY
-
TRAIN
public static final PredefinedModeType TRAIN
-
TRAM
public static final PredefinedModeType TRAM
-
LIGHTRAIL
public static final PredefinedModeType LIGHTRAIL
-
FERRY
public static final PredefinedModeType FERRY
-
GOODS_VEHICLE
public static final PredefinedModeType GOODS_VEHICLE
-
HEAVY_GOODS_VEHICLE
public static final PredefinedModeType HEAVY_GOODS_VEHICLE
-
LARGE_HEAVY_GOODS_VEHICLE
public static final PredefinedModeType LARGE_HEAVY_GOODS_VEHICLE
-
-
Method Detail
-
values
public static PredefinedModeType[] 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 (PredefinedModeType c : PredefinedModeType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PredefinedModeType 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
-
value
public final String value()
-
create
public static PredefinedModeType create(String predefinedModeTypeValue)
convert string to enum. When no match can be found, the custom type is returned- Parameters:
predefinedModeTypeValue
- to convert to enum- Returns:
- the enum value, CUSTOM when no match could be found
-
getPredefinedModeTypesWithout
public static EnumSet<PredefinedModeType> getPredefinedModeTypesWithout(PredefinedModeType... excludedModeTypes)
Collect all predefined mode types- Parameters:
excludedModeTypes
- option to exclude predefined custom modes from the result- Returns:
- predefined mode types minus excluded types
-
getPredefinedModeTypes
public static EnumSet<PredefinedModeType> getPredefinedModeTypes()
collect all predefined mode types- Returns:
- predefined mode types
-
-