Class PerceptionIterableSet<P extends PerceivedObject>

java.lang.Object
org.opentrafficsim.road.gtu.lane.perception.PerceptionIterableSet<P>
Type Parameters:
P - perceived object type
All Implemented Interfaces:
Iterable<P>, PerceptionIterable<P>

public class PerceptionIterableSet<P extends PerceivedObject> extends Object implements PerceptionIterable<P>
Simple implementation of PerceptionIterable which wraps a set. Constructors are available for an empty set, a single-valued set, or a sorted set.

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.

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Constructor Details

    • PerceptionIterableSet

      public PerceptionIterableSet()
      Creates an empty iterable.
    • PerceptionIterableSet

      public PerceptionIterableSet(P headway)
      Creates a single-value iterable.
      Parameters:
      headway - headway
    • PerceptionIterableSet

      public PerceptionIterableSet(SortedSet<P> headways)
      Creates an iterable from a sorted set.
      Parameters:
      headways - set of headway
  • Method Details