primaryIterator
protected abstract Iterator<AbstractPerceptionReiterable<P,H,U>.PrimaryIteratorEntry> primaryIterator()
Returns the primary iterator. This method is called once by AbstractPerceptionReiterable.
- Returns:
- primary iterator
P
- perceiving object typeH
- headway typeU
- underlying object typeIterable<H>
, PerceptionCollectable<H,U>
, PerceptionIterable<H>
MultiLanePerceptionIterable
iterator()
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.UnderlyingDistance<U>
protected
AbstractPerceptionReiterable(P perceivingObject)
(package private) final void
(package private) AbstractPerceptionReiterable<P,H,U>.org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable.SecondaryIteratorEntry
assureNext(AbstractPerceptionReiterable<P,H,U>.org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable.SecondaryIteratorEntry next,
AbstractPerceptionReiterable<P,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,
Function<I,C> finalizer)
final H
first()
protected P
(package private) final Iterator<AbstractPerceptionReiterable<P,H,U>.PrimaryIteratorEntry>
final boolean
isEmpty()
iterator()
protected abstract H
protected abstract Iterator<AbstractPerceptionReiterable<P,H,U>.PrimaryIteratorEntry>
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
collect
perceivingObject
- perceiving object.object
- underlying objectdistance
- distance to the objectGtuException
- on exceptionorg.opentrafficsim.base.parameters.ParameterException
- on invalid parameter value or missing parameterPerceptionIterable
first
in interface PerceptionIterable<P extends LaneBasedObject>
next
- next objectPerceptionIterable
isEmpty
in interface PerceptionIterable<P extends LaneBasedObject>
iterator
in interface Iterable<P extends LaneBasedObject>
PerceptionCollectable
collect
in interface PerceptionCollectable<P extends LaneBasedObject,H extends Headway>
C
- collection result typeI
- intermediate typeidentity
- the initial intermediate result valueaccumulator
- accumulatorfinalizer
- finalizerPerceptionCollectable
underlying
in interface PerceptionCollectable<P extends LaneBasedObject,H extends Headway>
PerceptionCollectable
underlyingWithDistance
in interface PerceptionCollectable<P extends LaneBasedObject,H extends Headway>
next
- currently known next entrylastReturned
- entry of last returned object or value