TraverseModeSet Data Type

A set of traverse modes -- typically, one non-transit mode (walking, biking, car) and zero or more transit modes (bus, tram, etc). This class allows efficiently adding or removing modes from a set.

Implemented Interfaces
Cloneable, Serializable
Properties
name data type constraints description
bicycle boolean required
walk boolean required
car boolean required
tram boolean required
bus boolean required
gondola boolean required
ferry boolean required
cableCar boolean required
funicular boolean required
rail boolean required
trolleyBus boolean required
subway boolean required
airplane boolean required
transit boolean required Returns true if the trip may use some transit mode
nonTransitSet TraverseModeSet   Returns a TraverseModeSet containing only the non-transit modes set.
modes array of TraverseMode  
valid boolean required
asStr string   get this traverse mode as a string that can be fed back into the constructor

Example

{
  "bicycle" : true,
  "walk" : true,
  "car" : true,
  "tram" : true,
  "bus" : true,
  "gondola" : true,
  "ferry" : true,
  "cableCar" : true,
  "funicular" : true,
  "rail" : true,
  "trolleyBus" : true,
  "subway" : true,
  "airplane" : true,
  "transit" : true,
  "nonTransitSet" : {
    "bicycle" : true,
    "walk" : true,
    "car" : true,
    "tram" : true,
    "bus" : true,
    "gondola" : true,
    "ferry" : true,
    "cableCar" : true,
    "funicular" : true,
    "rail" : true,
    "trolleyBus" : true,
    "subway" : true,
    "airplane" : true,
    "transit" : true,
    "nonTransitSet" : { },
    "modes" : [ "MONORAIL", "WALK" ],
    "valid" : true,
    "asStr" : "..."
  },
  "modes" : [ "WALK", "TROLLEYBUS" ],
  "valid" : true,
  "asStr" : "..."
}