Class SortedSetPerceptionIterable<H extends Headway>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.TreeSet<H>
org.opentrafficsim.road.gtu.lane.perception.SortedSetPerceptionIterable<H>
- Type Parameters:
H- headway type
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<H>,Collection<H>,NavigableSet<H>,Set<H>,SortedSet<H>,PerceptionCollectable<H,LaneBasedGTU>,PerceptionIterable<H>
@Deprecated public class SortedSetPerceptionIterable<H extends Headway> extends TreeSet<H> implements PerceptionCollectable<H,LaneBasedGTU>
Deprecated.
Simple class implementing a SortedSet. This is mainly for backwards compatibility. Methods that determine the elements 1-by-1
are much preferred for efficiency.
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.
- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 19 feb. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opentrafficsim.road.gtu.lane.perception.PerceptionCollectable
PerceptionCollectable.Intermediate<I>, PerceptionCollectable.PerceptionAccumulator<U,I>, PerceptionCollectable.PerceptionCollector<C,U,I>, PerceptionCollectable.PerceptionFinalizer<C,I>, PerceptionCollectable.UnderlyingDistance<U> -
Constructor Summary
Constructors Constructor Description SortedSetPerceptionIterable(OTSRoadNetwork otsNetwork)Deprecated.Constructor. -
Method Summary
Modifier and Type Method Description <C, I> Ccollect(Supplier<I> identity, PerceptionCollectable.PerceptionAccumulator<? super LaneBasedGTU,I> accumulator, PerceptionCollectable.PerceptionFinalizer<C,I> finalizer)Deprecated.Collect the underlying objects in to a perceived result.Iterator<LaneBasedGTU>underlying()Deprecated.Returns an iterator over the underlying objects.Iterator<PerceptionCollectable.UnderlyingDistance<LaneBasedGTU>>underlyingWithDistance()Deprecated.Returns an iterator over the underlying objects coupled with the distance.Methods inherited from class java.util.TreeSet
add, addAll, ceiling, clear, clone, comparator, contains, descendingIterator, descendingSet, first, floor, headSet, headSet, higher, isEmpty, iterator, last, lower, pollFirst, pollLast, remove, size, spliterator, subSet, subSet, tailSet, tailSetMethods inherited from class java.util.AbstractCollection
containsAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opentrafficsim.road.gtu.lane.perception.PerceptionCollectable
collectMethods inherited from interface org.opentrafficsim.road.gtu.lane.perception.PerceptionIterable
first, isEmpty
-
Constructor Details
-
SortedSetPerceptionIterable
Deprecated.Constructor.- Parameters:
otsNetwork- OTSRoadNetwork; network to obtain LaneBasedGTU
-
-
Method Details
-
collect
public <C, I> C collect(Supplier<I> identity, PerceptionCollectable.PerceptionAccumulator<? super LaneBasedGTU,I> accumulator, PerceptionCollectable.PerceptionFinalizer<C,I> finalizer)Deprecated.Collect the underlying objects in to a perceived result. This methodology is loosely based on Stream.collect().- Specified by:
collectin interfacePerceptionCollectable<H extends Headway,LaneBasedGTU>- Type Parameters:
C- collection result typeI- intermediate type- Parameters:
identity- Supplier<I>; the initial intermediate result valueaccumulator- PerceptionAccumulator<? super U, I>; accumulatorfinalizer- PerceptionFinalizer<C, I>; finalizer- Returns:
- C; collection result
-
underlying
Deprecated.Returns an iterator over the underlying objects.- Specified by:
underlyingin interfacePerceptionCollectable<H extends Headway,LaneBasedGTU>- Returns:
- Iterator<U>; iterator
-
underlyingWithDistance
Deprecated.Returns an iterator over the underlying objects coupled with the distance.- Specified by:
underlyingWithDistancein interfacePerceptionCollectable<H extends Headway,LaneBasedGTU>- Returns:
- Iterator<UnderlyingDistance<U>>; iterator
-