S
- underlying type of path sectionspublic class GraphCrossSection<S> extends AbstractGraphSpace<S>
GraphCrossSection
defines the location of graphs. It has one section having one or more source objects depending on
the number of series. For example, a 3-lane road may result in a section with 3 series. Graphs can aggregate the series, or
show multiple series.
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.
Constructor and Description |
---|
GraphCrossSection(List<String> seriesNames,
GraphPath.Section<S> section,
List<Length> positions)
Constructor.
|
GraphCrossSection(String seriesName,
GraphPath.Section<S> section,
Length position)
Constructor for a one-series cross section.
|
Modifier and Type | Method and Description |
---|---|
S |
getSource(int series)
Returns the underlying source of the series.
|
Iterator<S> |
iterator() |
Iterator<S> |
iterator(int series)
Returns an iterator over the sources on the given series.
|
Length |
position(int series)
Returns the position on the underlying source of the series.
|
String |
toString() |
getName, getNumberOfSeries
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public GraphCrossSection(String seriesName, GraphPath.Section<S> section, Length position)
seriesName
- String; name of seriessection
- Section<S>; sectionposition
- Length; position on the sectionpublic S getSource(int series)
series
- int; series numberpublic Iterator<S> iterator(int series)
series
- int; number of the seriespublic Length position(int series)
series
- int; series numberCopyright © 2014–2019 Delft University of Technology. All rights reserved.