public class StateEditor extends Object
Modifier | Constructor and Description |
---|---|
protected |
StateEditor() |
|
StateEditor(RoutingRequest options,
Vertex v) |
|
StateEditor(State parent,
Edge e) |
Modifier and Type | Method and Description |
---|---|
void |
alightTransit() |
void |
beginVehicleRenting(TraverseMode vehicleMode) |
void |
blockTraversal()
Tell the stateEditor to return null when makeState() is called, no matter what other editing
has been done.
|
void |
doneVehicleRenting() |
int |
getCallAndRideTime() |
long |
getElapsedTimeSeconds() |
Object |
getExtension(Object key) |
long |
getLastAlightedTimeSeconds() |
int |
getNumBoardings() |
int |
getPreTransitTime() |
Trip |
getPreviousTrip() |
FeedScopedId |
getRoute() |
long |
getTimeSeconds() |
FeedScopedId |
getTripId() |
Vertex |
getVertex() |
double |
getWalkDistance() |
String |
getZone() |
boolean |
hasEnteredNoThroughTrafficArea() |
void |
incrementCallAndRideTime(int seconds) |
void |
incrementNumBoardings() |
void |
incrementPreTransitTime(int seconds) |
void |
incrementTimeInMilliseconds(long milliseconds) |
void |
incrementTimeInSeconds(int seconds)
Advance or rewind the time of the new state by the given non-negative amount.
|
void |
incrementWalkDistance(double length) |
void |
incrementWeight(double weight) |
boolean |
isEverBoarded() |
boolean |
isMaxPreTransitTimeExceeded(RoutingRequest options) |
boolean |
isRentingBike() |
State |
makeState()
Why can a state editor only be used once? If you modify some component of state with and
editor, use the editor to create a new state, and then make more modifications, these
modifications will be applied to the previously created state.
|
void |
setBackMode(TraverseMode mode) |
void |
setBackWalkingBike(boolean walkingBike) |
void |
setBikeParked(boolean bikeParked) |
void |
setBikeRentalNetwork(Set<String> networks) |
void |
setCarParked(boolean carParked)
This has two effects: marks the car as parked, and switches the current mode.
|
void |
setEnteredNoThroughTrafficArea() |
void |
setEverBoarded(boolean everBoarded) |
void |
setExtension(Object key,
Object value)
Put a new value into the State extensions map.
|
void |
setFromState(State state)
Set non-incremental state values (ex.
|
void |
setInitialWaitTimeSeconds(long initialWaitTimeSeconds)
Initial wait time is recorded so it can be subtracted out of paths in lieu of "reverse optimization".
|
void |
setIsLastBoardAlightDeviated(boolean isLastBoardAlightDeviated) |
void |
setLastAlightedTimeSeconds(long lastAlightedTimeSeconds) |
void |
setLastNextArrivalDelta(int lastNextArrivalDelta)
The lastNextArrivalDelta is the amount of time between the arrival of the last trip
the planner used and the arrival of the trip after that.
|
void |
setLastPattern(TripPattern pattern) |
void |
setNonTransitOptionsFromState(State state) |
void |
setNumBoardings(int numBoardings) |
void |
setOptions(RoutingRequest options) |
void |
setPreTransitTime(int preTransitTime) |
void |
setPreviousStop(Stop previousStop) |
void |
setPreviousTrip(Trip previousTrip) |
void |
setRoute(FeedScopedId routeId) |
void |
setServiceDay(ServiceDay day) |
void |
setStartTimeSeconds(long seconds) |
void |
setTimeSeconds(long seconds) |
void |
setTripId(FeedScopedId tripId) |
void |
setTripTimes(TripTimes tripTimes) |
void |
setWalkDistance(double walkDistance) |
void |
setZone(String zone) |
String |
toString() |
boolean |
weHaveWalkedTooFar(RoutingRequest options) |
protected State child
protected StateEditor()
public StateEditor(RoutingRequest options, Vertex v)
public State makeState()
public boolean weHaveWalkedTooFar(RoutingRequest options)
public boolean isMaxPreTransitTimeExceeded(RoutingRequest options)
public void setExtension(Object key, Object value)
public void blockTraversal()
public void incrementWeight(double weight)
public void incrementTimeInSeconds(int seconds)
public void incrementTimeInMilliseconds(long milliseconds)
public void incrementWalkDistance(double length)
public void incrementPreTransitTime(int seconds)
public void incrementCallAndRideTime(int seconds)
public void incrementNumBoardings()
public void setTripTimes(TripTimes tripTimes)
public void setTripId(FeedScopedId tripId)
public void setPreviousTrip(Trip previousTrip)
public void setEnteredNoThroughTrafficArea()
public void setInitialWaitTimeSeconds(long initialWaitTimeSeconds)
public void setBackMode(TraverseMode mode)
public void setBackWalkingBike(boolean walkingBike)
public void setLastNextArrivalDelta(int lastNextArrivalDelta)
public void setWalkDistance(double walkDistance)
public void setPreTransitTime(int preTransitTime)
public void setZone(String zone)
public void setRoute(FeedScopedId routeId)
public void setNumBoardings(int numBoardings)
public void setEverBoarded(boolean everBoarded)
public void beginVehicleRenting(TraverseMode vehicleMode)
public void doneVehicleRenting()
public void setCarParked(boolean carParked)
public void setBikeParked(boolean bikeParked)
public void setPreviousStop(Stop previousStop)
public void setLastAlightedTimeSeconds(long lastAlightedTimeSeconds)
public void setTimeSeconds(long seconds)
public void setStartTimeSeconds(long seconds)
public void setFromState(State state)
State.getRoute()
) from an existing state.
Incremental values (ex. State.getNumBoardings()
) are not currently set.state
- public void setNonTransitOptionsFromState(State state)
public long getTimeSeconds()
public long getElapsedTimeSeconds()
public FeedScopedId getTripId()
public Trip getPreviousTrip()
public String getZone()
public FeedScopedId getRoute()
public int getNumBoardings()
public boolean isEverBoarded()
public boolean isRentingBike()
public long getLastAlightedTimeSeconds()
public double getWalkDistance()
public int getPreTransitTime()
public int getCallAndRideTime()
public Vertex getVertex()
public void alightTransit()
public void setLastPattern(TripPattern pattern)
public void setIsLastBoardAlightDeviated(boolean isLastBoardAlightDeviated)
public void setOptions(RoutingRequest options)
public void setServiceDay(ServiceDay day)
public boolean hasEnteredNoThroughTrafficArea()
Copyright © 2019. All rights reserved.