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
ConstructorsModifierConstructorDescriptionSimpleStreamer(Iterable<T> iterable) Construct Streamer based onIterable.SimpleStreamer(Collection<T> coll) Construct Streamer based onCollection.SimpleStreamer(Iterator<T> iterator) Construct Streamer based onIterator.protectedSimpleStreamer(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, waitMethods inherited from interface java.util.Iterator
forEachRemainingMethods inherited from interface com.tangosol.util.Streamer
isAllInclusive, isSized, remove, spliterator, stream
-
Constructor Details
-
SimpleStreamer
Construct Streamer based onIterable.- Parameters:
iterable- anIterableto createStreamerfrom
-
SimpleStreamer
Construct Streamer based onIterator.- Parameters:
iterator- anIteratorto createStreamerfrom
-
SimpleStreamer
Construct Streamer based onStream.- Parameters:
stream- aStreamto createStreamerfrom
-
SimpleStreamer
Construct Streamer based onCollection.- Parameters:
coll- aCollectionto createStreamerfrom
-
SimpleStreamer
Construct Streamer instance.- Parameters:
iterator- anIteratorto createStreamerfromcSize- the number of elements thisStreamerwill iterate overnCharacteristics- the bit mask representing thisStreamer's characteristics
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
size
public long size()Description copied from interface:StreamerReturn the exact size of the data set thisStreamerwill iterate over, or negative integer if the exact size is unknown. -
characteristics
public int characteristics()Description copied from interface:StreamerA bit mask representing the set of characteristics of thisStreamer.- Specified by:
characteristicsin interfaceStreamer<T>- Returns:
- a bit mask representing the set of characteristics of this
Streamer
-