public class TrajectoryAcceptList extends Object
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 |
|---|
TrajectoryAcceptList() |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptAll()
Accept all trajectories.
|
void |
acceptTrajectory(Trajectory<?> trajectory)
Accept given trajectory.
|
void |
acceptTrajectory(Trajectory<?> trajectory,
boolean accept)
Accept or reject given trajectory.
|
void |
addTrajectory(Trajectory<?> trajectory,
TrajectoryGroup trajectoryGroup)
Adds a
Trajectory with the TrajectoryGroup it is from to the accept list. |
Trajectory<?> |
getTrajectory(int i) |
TrajectoryGroup |
getTrajectoryGroup(int i) |
Iterator<TrajectoryGroup> |
getTrajectoryGroupIterator() |
Iterator<Trajectory<?>> |
getTrajectoryIterator() |
boolean |
isAccepted(Trajectory<?> trajectory)
Returns whether the given trajectory is accepted or not.
|
void |
rejectAll()
Reject all trajectories.
|
void |
rejectTrajectory(Trajectory<?> trajectory)
Reject given trajectory.
|
int |
size() |
String |
toString() |
public final void addTrajectory(Trajectory<?> trajectory, TrajectoryGroup trajectoryGroup)
Trajectory with the TrajectoryGroup it is from to the accept list.trajectory - Trajectory<?>; Trajectory trajectorytrajectoryGroup - TrajectoryGroup; TrajectoryGroup trajectoriesIllegalArgumentException - if the Trajectory is not within the TrajectoryGroupIllegalArgumentException - if the Trajectory belongs to a different GTU than an earlier provided
Trajectorypublic final int size()
public final Trajectory<?> getTrajectory(int i)
i - int; number of trajectory to gettrajectoryIndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size())public final TrajectoryGroup getTrajectoryGroup(int i)
i - int; number of TrajectoryGroup to getTrajectoryGroupIndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size())public final Iterator<Trajectory<?>> getTrajectoryIterator()
trajectory's, does not allow removalpublic final Iterator<TrajectoryGroup> getTrajectoryGroupIterator()
TrajectoryGroup's, does not allow removalpublic final void acceptTrajectory(Trajectory<?> trajectory)
trajectory - Trajectory<?>; trajectory to acceptIllegalArgumentException - if the trajectory is not part of the trajectory accept listpublic final void rejectTrajectory(Trajectory<?> trajectory)
trajectory - Trajectory<?>; trajectory to rejectIllegalArgumentException - if the trajectory is not part of the trajectory accept listpublic final void acceptTrajectory(Trajectory<?> trajectory, boolean accept)
trajectory - Trajectory<?>; trajectory to accept or rejectaccept - boolean; whether to accept the trajectoryIllegalArgumentException - if the trajectory is not part of the trajectory accept listpublic final void acceptAll()
public final void rejectAll()
public final boolean isAccepted(Trajectory<?> trajectory)
false by default.trajectory - Trajectory<?>; trajectoryIllegalArgumentException - if the trajectory is not part of the trajectory accept listCopyright © 2014–2019 Delft University of Technology. All rights reserved.