public static interface Sample.Iterator<IT_DATA> extends Closeable, ListIterator<Sample<IT_DATA>>
Modifier and Type | Method and Description |
---|---|
void |
add(Sample<IT_DATA> o) |
void |
close()
This operation indicates to that the application is done accessing
the list of Samples obtained by some earlier invocation of
DataReader.read() or DataReader.take() . |
void |
remove() |
void |
set(Sample<IT_DATA> o) |
hasNext, hasPrevious, next, nextIndex, previous, previousIndex
void close() throws IOException
DataReader.read()
or DataReader.take()
.
The operation allows implementations to "loan" buffers from the
DataReader to the application and in this manner provide
"zero-copy" access to the data. During the loan, the DataReader
will guarantee that the data and sample information are not
modified.
It is not necessary for an application to return the loans
immediately after the read or take calls. However, as these
buffers correspond to internal resources inside the DataReader,
the application should not retain them indefinitely.
The use of the operation is only necessary if the read or take
calls "loaned" buffers to the application. The situations in which
this occurs are described in the documentation for
DataReader.read()
and DataReader.take()
. However,
calling close on a collection that does not have a loan is
safe and has no side effects.close
in interface AutoCloseable
close
in interface Closeable
IOException
DataReader.read()
,
DataReader.take()
void remove()
remove
in interface Iterator<Sample<IT_DATA>>
remove
in interface ListIterator<Sample<IT_DATA>>
UnsupportedOperationException
- always.void set(Sample<IT_DATA> o)
set
in interface ListIterator<Sample<IT_DATA>>
UnsupportedOperationException
- always.void add(Sample<IT_DATA> o)
add
in interface ListIterator<Sample<IT_DATA>>
UnsupportedOperationException
- always.Copyright © 2014. All rights reserved.