A
- the actual type of AmetysObject
s.public class ChainedAmetysObjectIterable<A extends AmetysObject> extends Object implements AmetysObjectIterable<A>
AmetysObjectIterable
based on a list of others AmetysObjectIterable
.Modifier and Type | Class and Description |
---|---|
(package private) class |
ChainedAmetysObjectIterable.ChainedIterator |
Modifier and Type | Field and Description |
---|---|
private List<AmetysObjectIterable<A>> |
_iterables |
(package private) long |
_size |
private boolean |
_sizeComputed |
Constructor and Description |
---|
ChainedAmetysObjectIterable(List<AmetysObjectIterable<A>> iterables)
Creates a
ChainedAmetysObjectIterable . |
Modifier and Type | Method and Description |
---|---|
private long |
_computeSize() |
void |
close()
Close the associated resources.
An AmetysObjectIterable must NOT be closed if any of the contained AmetysObject is still in use. |
long |
getSize()
Returns the number of elements in this iterable.
|
AmetysObjectIterator<A> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
spliterator, stream
long _size
private List<AmetysObjectIterable<A extends AmetysObject>> _iterables
private boolean _sizeComputed
public ChainedAmetysObjectIterable(List<AmetysObjectIterable<A>> iterables)
ChainedAmetysObjectIterable
.iterables
- a list of AmetysObjectIterable
.public long getSize()
AmetysObjectIterable
getSize
in interface AmetysObjectIterable<A extends AmetysObject>
private long _computeSize()
public AmetysObjectIterator<A> iterator()
iterator
in interface Iterable<A extends AmetysObject>
iterator
in interface AmetysObjectIterable<A extends AmetysObject>
public void close()
AmetysObjectIterable
AmetysObjectIterable
must NOT be closed if any of the contained AmetysObject
is still in use.close
in interface Closeable
close
in interface AutoCloseable
close
in interface AmetysObjectIterable<A extends AmetysObject>