Class PerceptionIterableSet<H extends Headway>

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

public class PerceptionIterableSet<H extends Headway> extends Object implements PerceptionIterable<H>
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(H headway)
      Creates a single-value iterable.
      Parameters:
      headway - H; headway
    • PerceptionIterableSet

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