DataBuffer
public interface DataBuffer<T> extends Iterable, Releasable, Closeable
AbstractDataBuffer |
Default implementation of DataBuffer. |
Interface for a buffer of typed data.
Summary
Public methods |
|
|---|---|
abstract void |
close()Releases the data buffer, for use in try-with-resources. |
abstract @NonNull T |
get(int position)Returns an element on specified position. |
abstract int |
getCount() |
abstract boolean |
This method is deprecated.
|
abstract Iterator<T> |
iterator() |
default void |
release()Releases resources used by the buffer. |
abstract Iterator<T> |
In order to use this iterator it should be supported by particular |
Inherited methods |
||||
|---|---|---|---|---|
|
Public methods
close
abstract void close()
Releases the data buffer, for use in try-with-resources.
Both close and release shall have identical semantics, and are idempotent.
singleRefIterator
abstract Iterator<T> singleRefIterator()
In order to use this iterator it should be supported by particular DataBuffer. Be careful: there will be single reference while iterating. If you are not sure - DO NOT USE this iterator.