Package com.tangosol.util
Class SimpleStreamer<T>
java.lang.Object
com.tangosol.util.SimpleStreamer<T>
Simple implementation of a
Streamer
.- Since:
- 12.2.1
- Author:
- as 2015.05.07
-
Field Summary
Fields inherited from interface com.tangosol.util.Streamer
ALL_INCLUSIVE, SIZED
-
Constructor Summary
ModifierConstructorDescriptionSimpleStreamer
(Iterable<T> iterable) Construct Streamer based onIterable
.SimpleStreamer
(Collection<T> coll) Construct Streamer based onCollection
.SimpleStreamer
(Iterator<T> iterator) Construct Streamer based onIterator
.protected
SimpleStreamer
(Iterator<T> iterator, long cSize, int nCharacteristics) Construct Streamer instance.SimpleStreamer
(Stream<T> stream) Construct Streamer based onStream
. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
Methods inherited from interface com.tangosol.util.Streamer
isAllInclusive, isSized, remove, spliterator, stream
-
Constructor Details
-
SimpleStreamer
Construct Streamer based onIterable
.- Parameters:
iterable
- anIterable
to createStreamer
from
-
SimpleStreamer
Construct Streamer based onIterator
.- Parameters:
iterator
- anIterator
to createStreamer
from
-
SimpleStreamer
Construct Streamer based onStream
.- Parameters:
stream
- aStream
to createStreamer
from
-
SimpleStreamer
Construct Streamer based onCollection
.- Parameters:
coll
- aCollection
to createStreamer
from
-
SimpleStreamer
Construct Streamer instance.- Parameters:
iterator
- anIterator
to createStreamer
fromcSize
- the number of elements thisStreamer
will iterate overnCharacteristics
- the bit mask representing thisStreamer
's characteristics
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
size
public long size()Description copied from interface:Streamer
Return the exact size of the data set thisStreamer
will iterate over, or negative integer if the exact size is unknown. -
characteristics
public int characteristics()Description copied from interface:Streamer
A bit mask representing the set of characteristics of thisStreamer
.- Specified by:
characteristics
in interfaceStreamer<T>
- Returns:
- a bit mask representing the set of characteristics of this
Streamer
-