public class TrajectoryGroup extends Object
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.
Constructor and Description |
---|
TrajectoryGroup(Time startTime,
KpiLaneDirection laneDirection)
Constructor without length specification.
|
TrajectoryGroup(Time startTime,
Length startPosition,
Length endPosition,
KpiLaneDirection laneDirection) |
Modifier and Type | Method and Description |
---|---|
void |
addTrajectory(Trajectory<?> trajectory)
Add trajectory.
|
boolean |
contains(Trajectory<?> trajectory)
Whether this
TrajectoryGroup holds the given trajectory. |
boolean |
equals(Object obj) |
KpiLaneDirection |
getLaneDirection()
Returns the lane direction.
|
Length |
getLength() |
Time |
getStartTime() |
List<Trajectory<?>> |
getTrajectories()
Returns a list of trajectories.
|
TrajectoryGroup |
getTrajectoryGroup(Length x0,
Length x1)
Returns trajectory group between two locations.
|
TrajectoryGroup |
getTrajectoryGroup(Length x0,
Length x1,
Time t0,
Time t1)
Returns trajectory group between two locations and between two times.
|
TrajectoryGroup |
getTrajectoryGroup(Time t0,
Time t1)
Returns trajectory group between two times.
|
int |
hashCode() |
int |
size()
Returns the number of trajectories in this group.
|
String |
toString() |
public TrajectoryGroup(Time startTime, KpiLaneDirection laneDirection)
startTime
- start time of trajectorieslaneDirection
- lane directionpublic TrajectoryGroup(Time startTime, Length startPosition, Length endPosition, KpiLaneDirection laneDirection)
startTime
- start time of trajectory groupstartPosition
- start positionendPosition
- end positionlaneDirection
- lane directionpublic final void addTrajectory(Trajectory<?> trajectory)
trajectory
- trajectory to addpublic final Time getStartTime()
public final Length getLength()
public final boolean contains(Trajectory<?> trajectory)
TrajectoryGroup
holds the given trajectory. Note that this is false if the given trajectory is
derived from a trajectory in this TrajectoryGroup
.trajectory
- trajectoryTrajectoryGroup
holds the given trajectory.public final int size()
public final List<Trajectory<?>> getTrajectories()
public final TrajectoryGroup getTrajectoryGroup(Length x0, Length x1)
x0
- start lengthx1
- end lengthpublic final TrajectoryGroup getTrajectoryGroup(Time t0, Time t1)
t0
- start timet1
- end timepublic final TrajectoryGroup getTrajectoryGroup(Length x0, Length x1, Time t0, Time t1)
x0
- start lengthx1
- end lengtht0
- start timet1
- end timepublic final KpiLaneDirection getLaneDirection()
Copyright © 2014–2018 Delft University of Technology. All rights reserved.