Constructor and Description |
---|
OverlayCollection()
Creates an empty collection.
|
OverlayCollection(java.util.stream.Stream<Overlay> stream)
Creates the collection from a stream of
Overlay s. |
Modifier and Type | Method and Description |
---|---|
void |
add(Overlay overlay)
Append an overlay to the end of the list.
|
Overlay |
get(int index)
Access a particular element in the collection by index.
|
Iterator<Overlay> |
iterator() |
int |
size()
The total number of elements in the list.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public OverlayCollection()
public OverlayCollection(java.util.stream.Stream<Overlay> stream)
Overlay
s.
Each element is reused internally, without any copying.
stream
- the stream.public Overlay get(int index)
index
- the index (starting at 0).index
.IndexOutOfBoundsException
- if the index is out of range (index < 0 || index
>= size())public int size()
public void add(Overlay overlay)
overlay
- the overlay to append.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.