Package com.tangosol.util
Interface Streamer<T>
- All Superinterfaces:
 Iterator<T>
- All Known Implementing Classes:
 SimpleStreamer
Enables traversal of elements in the underlying data set using either
 
Iterator, Spliterator or a Stream, while allowing
 implementors to provide additional metadata, such as the size and other
 characteristics of the underlying data set.
 
 Similarly to the Spliterator, the Streamer allows only a
 single traversal of the underlying data set. Moreover, a Spliterator or a Stream retrieved from a partially
 consumed Streamer will continue the traversal of the underlying data.
 
 Note, that the removal of the underlying elements is not supported.
- Since:
 - 12.2.1
 - Author:
 - as 2015.05.06
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intCharacteristic value signifying that this Streamer includes all the values from the underlying data set.static final intCharacteristic value signifying that the value returned fromsize()prior to traversal represents a finite size that, in the absence of structural source modification, represents an exact count of the number of elements that would be encountered by a complete traversal. - 
Method Summary
Modifier and TypeMethodDescriptionintA bit mask representing the set of characteristics of thisStreamer.default booleanA convenience accessor to check if this streamer isALL_INCLUSIVE.default booleanisSized()A convenience accessor to check if this streamer isSIZED.default voidremove()This operation is not supported.longsize()Return the exact size of the data set thisStreamerwill iterate over, or negative integer if the exact size is unknown.default Spliterator<T> Return aSpliteratorover the elements described by thisStreamer.stream()Return aStreambased on thisStreamer.Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next 
- 
Field Details
- 
SIZED
static final int SIZEDCharacteristic value signifying that the value returned fromsize()prior to traversal represents a finite size that, in the absence of structural source modification, represents an exact count of the number of elements that would be encountered by a complete traversal.- See Also:
 
 - 
ALL_INCLUSIVE
static final int ALL_INCLUSIVECharacteristic value signifying that this Streamer includes all the values from the underlying data set.- See Also:
 
 
 - 
 - 
Method Details
- 
size
long size()Return the exact size of the data set thisStreamerwill iterate over, or negative integer if the exact size is unknown.- Returns:
 - the exact size of the data set this 
Streamerwill iterate over, or negative integer if the exact size is unknown 
 - 
characteristics
int characteristics()A bit mask representing the set of characteristics of thisStreamer.- Returns:
 - a bit mask representing the set of characteristics of this 
Streamer 
 - 
spliterator
Return aSpliteratorover the elements described by thisStreamer.- Returns:
 - a 
Spliteratorover the elements described by thisStreamer 
 - 
stream
Return aStreambased on thisStreamer.- Returns:
 - a 
Streambased on thisStreamer 
 - 
isSized
default boolean isSized()A convenience accessor to check if this streamer isSIZED.- Returns:
 trueif this streamer isSIZED, false otherwise
 - 
isAllInclusive
default boolean isAllInclusive()A convenience accessor to check if this streamer isALL_INCLUSIVE.- Returns:
 trueif this streamer isALL_INCLUSIVE, false otherwise
 - 
remove
default void remove()This operation is not supported. 
 -