G - gtu data typepublic class TrajectoryGroup<G extends GtuDataInterface> extends Object implements Iterable<Trajectory<G>>
 Copyright (c) 2013-2019 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<G> trajectory)Add trajectory. | 
| boolean | contains(Trajectory<?> trajectory)Whether this  TrajectoryGroupholds the given trajectory. | 
| boolean | equals(Object obj) | 
| KpiLaneDirection | getLaneDirection()Returns the lane direction. | 
| Length | getLength() | 
| Time | getStartTime() | 
| List<Trajectory<G>> | getTrajectories()Returns a list of trajectories. | 
| TrajectoryGroup<G> | getTrajectoryGroup(Length x0,
                  Length x1)Returns trajectory group between two locations. | 
| TrajectoryGroup<G> | getTrajectoryGroup(Length x0,
                  Length x1,
                  Time t0,
                  Time t1)Returns trajectory group between two locations and between two times. | 
| TrajectoryGroup<G> | getTrajectoryGroup(Time t0,
                  Time t1)Returns trajectory group between two times. | 
| int | hashCode() | 
| Iterator<Trajectory<G>> | iterator() | 
| int | size()Returns the number of trajectories in this group. | 
| String | toString() | 
clone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic TrajectoryGroup(Time startTime, KpiLaneDirection laneDirection)
startTime - Time; start time of trajectorieslaneDirection - KpiLaneDirection; lane directionpublic TrajectoryGroup(Time startTime, Length startPosition, Length endPosition, KpiLaneDirection laneDirection)
startTime - Time; start time of trajectory groupstartPosition - Length; start positionendPosition - Length; end positionlaneDirection - KpiLaneDirection; lane directionpublic final void addTrajectory(Trajectory<G> trajectory)
trajectory - Trajectory<G>; 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 - Trajectory<?>; trajectoryTrajectoryGroup holds the given trajectory.public final int size()
public final List<Trajectory<G>> getTrajectories()
public final TrajectoryGroup<G> getTrajectoryGroup(Length x0, Length x1)
x0 - Length; start lengthx1 - Length; end lengthpublic final TrajectoryGroup<G> getTrajectoryGroup(Time t0, Time t1)
t0 - Time; start timet1 - Time; end timepublic final TrajectoryGroup<G> getTrajectoryGroup(Length x0, Length x1, Time t0, Time t1)
x0 - Length; start lengthx1 - Length; end lengtht0 - Time; start timet1 - Time; end timepublic final KpiLaneDirection getLaneDirection()
public Iterator<Trajectory<G>> iterator()
iterator in interface Iterable<Trajectory<G extends GtuDataInterface>>Copyright © 2014–2019 Delft University of Technology. All rights reserved.