Class AbstractGraphSpace<S>

java.lang.Object
org.opentrafficsim.draw.graphs.AbstractGraphSpace<S>
Type Parameters:
S - underlying type of path sections
All Implemented Interfaces:
Iterable<S>
Direct Known Subclasses:
GraphCrossSection, GraphPath

public abstract class AbstractGraphSpace<S> extends Object implements Iterable<S>
Common functionality between a cross-section and a path.

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

    • AbstractGraphSpace

      public AbstractGraphSpace(List<String> seriesNames)
      Constructor.
      Parameters:
      seriesNames - List<String>; names of series
  • Method Details

    • getName

      public String getName(int series)
      Returns the name of the series.
      Parameters:
      series - int; series
      Returns:
      String; name of the series
    • getNumberOfSeries

      public int getNumberOfSeries()
      Returns the number of series.
      Returns:
      int; number of series
    • iterator

      abstract Iterator<S> iterator(int series)
      Returns an iterator over the sources on the given series.
      Parameters:
      series - int; number of the series
      Returns:
      Iterator<S>; iterator over the sources on the given series