Enum 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
    • 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 name
        NullPointerException - if the argument is null
      • getValue

        public Short getValue()
        Description copied from interface: EnumValue
        Collect internal value of the enum that implements this interface
        Specified by:
        getValue in interface EnumValue<Short>
        Returns:
        value
      • 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