primaryIterator
protected abstract Iterator<AbstractPerceptionReiterable<H,U>.PrimaryIteratorEntry> primaryIterator()
Returns the primary iterator. This method is called once by AbstractPerceptionReiterable.
- Returns:
- Iterator; primary iterator
H - headway typeU - underlying object typeIterable<H>, PerceptionCollectable<H,U> , PerceptionIterable<H>AbstractPerceptionIterable, MultiLanePerceptionIterableiterator() return an iterator which
iterates over the linked list. If an iterator runs to the end of the linked list, the primary iterator is requested to add an
element if it has one.
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
class iterator() method.protected class primaryIterator() to return, implemented in subclasses.PerceptionCollectable.Intermediate<I>, PerceptionCollectable.PerceptionAccumulator<U,I>, PerceptionCollectable.PerceptionCollector<C,U,I>, PerceptionCollectable.PerceptionFinalizer<C,I>, PerceptionCollectable.UnderlyingDistance<U> protected AbstractPerceptionReiterable(LaneBasedGtu perceivingGtu) (package private) final void(package private) AbstractPerceptionReiterable<H,U>.org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable.SecondaryIteratorEntry assureNext(AbstractPerceptionReiterable<H,U>.org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable.SecondaryIteratorEntry next,
AbstractPerceptionReiterable<H,U>.org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable.SecondaryIteratorEntry lastReturned) final <C,
I> C collect(Supplier<I> identity,
PerceptionCollectable.PerceptionAccumulator<? super U,I> accumulator,
PerceptionCollectable.PerceptionFinalizer<C,I> finalizer) final Hfirst()protected LaneBasedGtugetGtu()(package private) final Iterator<AbstractPerceptionReiterable<H,U>.PrimaryIteratorEntry> final booleanisEmpty()iterator()protected abstract Hperceive(LaneBasedGtu perceivingGtu,
U object,
org.djunits.value.vdouble.scalar.Length distance) protected abstract Iterator<AbstractPerceptionReiterable<H,U>.PrimaryIteratorEntry> clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorcollectperceivingGtu - LaneBasedGtu; perceiving GTUperceivingGtu - LaneBasedGtu; perceiving GTUobject - U; underlying objectdistance - Length; distance to the objectGtuException - on exceptionorg.opentrafficsim.base.parameters.ParameterException - on invalid parameter value or missing parameterfirst in interface PerceptionIterable<H extends Headway>next - PrimaryIteratorEntry; next objectisEmpty in interface PerceptionIterable<H extends Headway>collect in interface PerceptionCollectable<H extends Headway,U> C - collection result typeI - intermediate typeidentity - Supplier<I>; the initial intermediate result valueaccumulator - PerceptionAccumulator<? super U, I>; accumulatorfinalizer - PerceptionFinalizer<C, I>; finalizerunderlying in interface PerceptionCollectable<H extends Headway,U> underlyingWithDistance in interface PerceptionCollectable<H extends Headway,U> next - SecondaryIteratorEntry; currently known next entrylastReturned - SecondaryIteratorEntry; entry of last returned object or value