public class BusStop extends AbstractLaneBasedObject
BusStop
pertains to only one such location. The bus stop
in reality is represented by a shared name over a few BusStop
's, with different lines. As lines may also be set
dynamically, the name and lines are insufficient to identify a specific BusStop
. Hence there is a fixed unique id per
BusStop
.
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
listeners
FIRST_POSITION, LAST_POSITION
Constructor and Description |
---|
BusStop(String id,
Lane lane,
Length longitudinalPosition,
String name,
SimulatorInterface.TimeDoubleUnit simulator) |
Modifier and Type | Method and Description |
---|---|
AbstractLaneBasedObject |
clone(CrossSectionElement newCSE,
SimulatorInterface.TimeDoubleUnit newSimulator,
boolean animation)
Clone the LaneBasedObject for e.g., copying a network.
|
boolean |
equals(Object obj) |
Set<Conflict> |
getConflicts()
Returns the downstream conflicts of the bus stop.
|
ImmutableSet<String> |
getLines()
Returns the lines set.
|
int |
hashCode() |
void |
setLines(Set<String> lines)
Sets the lines.
|
String |
toString() |
clone, getDirection, getFullId, getLane, getLocation, getLongitudinalPosition
getBounds, getGeometry, getHeight, getId
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListener
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getBounds, makeGeometry
getGeometry, getHeight
getId
addListener, addListener, addListener, addListener, removeListener
public BusStop(String id, Lane lane, Length longitudinalPosition, String name, SimulatorInterface.TimeDoubleUnit simulator) throws NetworkException
id
- idlane
- lanelongitudinalPosition
- positionname
- name of stopsimulator
- the simulator to schedule onNetworkException
- when the position on the lane is out of boundspublic final void setLines(Set<String> lines)
lines
- lines that stop at this locationpublic final ImmutableSet<String> getLines()
public final Set<Conflict> getConflicts()
public final String toString()
toString
in class AbstractLaneBasedObject
public final AbstractLaneBasedObject clone(CrossSectionElement newCSE, SimulatorInterface.TimeDoubleUnit newSimulator, boolean animation) throws NetworkException
clone
in class AbstractLaneBasedObject
newCSE
- CrossSectionElement; the new cross section element to which the clone belongsnewSimulator
- SimulatorInterface.TimeDoubleUnit; the new simulator for this networkanimation
- boolean; whether to (re)create animation or notNetworkException
- in case the cloning failsCopyright © 2014–2018 Delft University of Technology. All rights reserved.