Package org.goplanit.gtfs.enums
Enum StopLocationType
- java.lang.Object
-
- java.lang.Enum<StopLocationType>
-
- org.goplanit.gtfs.enums.StopLocationType
-
- All Implemented Interfaces:
Serializable
,Comparable<StopLocationType>
,EnumOf<StopLocationType,Short>
,EnumValue<Short>
public enum StopLocationType extends Enum<StopLocationType> implements EnumOf<StopLocationType,Short>, EnumValue<Short>
Defines the different stop location types:- STOP_PLATFORM (0 or null or ""): A location where passengers board or disembark from a transit vehicle. Is called a platform when defined within a parent_station.
- STATION (1): A physical structure or area that contains one or more platform
- ENTRANCE_EXIT (2): A location where passengers can enter or exit a station from the street. If an entrance/exit belongs to multiple stations, it can be linked by pathways to both, but the data provider must pick one of them as parent.
- GENERIC_NODE (3): A location within a station, not matching any other location_type, which can be used to link together pathways define in pathways.txt.
- BOARDING_AREA (4): A specific location on a platform, where passengers can board and/or alight vehicles
- Author:
- markr
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOARDING_AREA
ENTRANCE_EXIT
GENERIC_NODE
STATION
STOP_PLATFORM
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Short
getValue()
Collect internal value of the enum that implements this interfacestatic StopLocationType
of(Short value)
Extract the enum based on its internal value (if matched)static StopLocationType
parseFrom(String value)
Collect the stop location type belonging to the given value.static StopLocationType
valueOf(String name)
Returns the enum constant of this type with the specified name.static StopLocationType[]
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 interface org.goplanit.utils.enums.EnumOf
createFromValues
-
-
-
-
Enum Constant Detail
-
STOP_PLATFORM
public static final StopLocationType STOP_PLATFORM
-
STATION
public static final StopLocationType STATION
-
ENTRANCE_EXIT
public static final StopLocationType ENTRANCE_EXIT
-
GENERIC_NODE
public static final StopLocationType GENERIC_NODE
-
BOARDING_AREA
public static final StopLocationType BOARDING_AREA
-
-
Method Detail
-
values
public static StopLocationType[] 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 (StopLocationType c : StopLocationType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static StopLocationType 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
-
getValue
public Short getValue()
Description copied from interface:EnumValue
Collect internal value of the enum that implements this interface
-
of
public static StopLocationType of(Short value)
Extract the enum based on its internal value (if matched)- Parameters:
value
- to base enum on- Returns:
- found match
-
parseFrom
public static StopLocationType parseFrom(String value)
Collect the stop location type belonging to the given value. It is assumed any non-null, non-empty value can be parsed as a short. If not this is logged and null is returned. In case of a blank or null input the location type defaults to STOP_PLATFORM- Parameters:
value
- to extract enum for- Returns:
- the stop location type found, null when not present
-
-