Interface MinimalTransferTimes
-
public interface MinimalTransferTimes
Container class to manage minimal transfer times between twoTransitStopFacility
. Transfer times are *not* bidirectional and *not* transitive. This means:- A transfer time defined from stop A to stop B does not define a transfer time from stop B to stop A.
- A transfer time defined from stop A to stop B, and another defined from stop B to stop C, does not define a transfer time from stop A to stop C.
get(Id, Id)
.- Author:
- mrieser / SBB
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
MinimalTransferTimes.MinimalTransferTimesIterator
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
get(Id<TransitStopFacility> fromStop, Id<TransitStopFacility> toStop)
double
get(Id<TransitStopFacility> fromStop, Id<TransitStopFacility> toStop, double defaultSeconds)
MinimalTransferTimes.MinimalTransferTimesIterator
iterator()
double
remove(Id<TransitStopFacility> fromStop, Id<TransitStopFacility> toStop)
Removes the minimal transfer time between the two stops if there was one set.double
set(Id<TransitStopFacility> fromStop, Id<TransitStopFacility> toStop, double seconds)
Sets the minimal transfer time in seconds needed to transfer fromfromStop
totoStop
.
-
-
-
Method Detail
-
set
double set(Id<TransitStopFacility> fromStop, Id<TransitStopFacility> toStop, double seconds)
Sets the minimal transfer time in seconds needed to transfer fromfromStop
totoStop
.- Parameters:
fromStop
-toStop
-seconds
- the minimal transfer time, in seconds- Returns:
- the minimal transfer time previously assigned between the two stops,
Double.NaN
if none was specified.
-
get
double get(Id<TransitStopFacility> fromStop, Id<TransitStopFacility> toStop)
- Parameters:
fromStop
-toStop
-- Returns:
- the minimal transfer time between the two stops if defined,
Double.NaN
if none is set.
-
get
double get(Id<TransitStopFacility> fromStop, Id<TransitStopFacility> toStop, double defaultSeconds)
- Parameters:
fromStop
-toStop
-defaultSeconds
-- Returns:
- the minimal transfer time between the two stops if defined,
defaultSeconds
if none is set.
-
remove
double remove(Id<TransitStopFacility> fromStop, Id<TransitStopFacility> toStop)
Removes the minimal transfer time between the two stops if there was one set.- Parameters:
fromStop
-toStop
-- Returns:
- the previously set minimal transfer time, or
Double.NaN
if none was set.
-
iterator
MinimalTransferTimes.MinimalTransferTimesIterator iterator()
- Returns:
- an iterator to iterate over all minimal transfer times set.
-
-