Package com.tangosol.util
Class SimpleStreamer<T>
- java.lang.Object
-
- com.tangosol.util.SimpleStreamer<T>
-
-
Field Summary
-
Fields inherited from interface com.tangosol.util.Streamer
ALL_INCLUSIVE, SIZED
-
-
Constructor Summary
Constructors Modifier Constructor Description SimpleStreamer(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
characteristics()
A bit mask representing the set of characteristics of thisStreamer
.boolean
hasNext()
T
next()
long
size()
Return the exact size of the data set thisStreamer
will iterate over, or negative integer if the exact size is unknown.-
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 Detail
-
SimpleStreamer
public SimpleStreamer(Iterable<T> iterable)
Construct Streamer based onIterable
.- Parameters:
iterable
- anIterable
to createStreamer
from
-
SimpleStreamer
public SimpleStreamer(Iterator<T> iterator)
Construct Streamer based onIterator
.- Parameters:
iterator
- anIterator
to createStreamer
from
-
SimpleStreamer
public SimpleStreamer(Stream<T> stream)
Construct Streamer based onStream
.- Parameters:
stream
- aStream
to createStreamer
from
-
SimpleStreamer
public SimpleStreamer(Collection<T> coll)
Construct Streamer based onCollection
.- Parameters:
coll
- aCollection
to createStreamer
from
-
SimpleStreamer
protected SimpleStreamer(Iterator<T> iterator, long cSize, int nCharacteristics)
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 Detail
-
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
-
-