Package io.datarouter.scanner
Class StreamScanner<T>
java.lang.Object
io.datarouter.scanner.BaseScanner<T>
io.datarouter.scanner.IteratorScanner<T>
io.datarouter.scanner.StreamScanner<T>
- All Implemented Interfaces:
Scanner<T>,Closeable,AutoCloseable
public class StreamScanner<T> extends IteratorScanner<T>
-
Field Summary
-
Constructor Summary
Constructors Constructor Description StreamScanner(Stream<T> stream) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.datarouter.scanner.Scanner
advanceUntil, advanceWhile, allMatch, anyMatch, append, append, append, apply, batch, collate, collate, collect, collect, concat, concatIter, count, deduplicate, deduplicateBy, distinct, distinctBy, each, exclude, findAny, findFirst, findLast, flush, forEach, groupBy, groupBy, groupBy, groupBy, hasAny, include, isEmpty, iterable, iterator, limit, link, list, listTo, map, max, min, noneMatch, parallel, prefetch, reduce, reduce, retain, sample, shuffle, skip, sorted, sorted, splitBy, stream, streamDoubles, streamInts, streamLongs, take, then, toArray, toMap, toMap, toMap, toMap, toMapSupplied, toMapSupplied, toMapSupplied, toMapSupplied
-
Constructor Details
-
Method Details
-
of
Description copied from interface:ScannerConvert an Object into a Scanner.- Parameters:
stream- A non-null Object- Returns:
- A single-item Scanner with the Object
-
close
public void close()Description copied from interface:ScannerOverride to cleanup any resources. The call should be propagated to all parent scanners. In the infrequent case of calling advance/current in an application, the Scanner should be explicitly closed. Because the included Scanner operations will close themselves when they fail to advance, it frequently a no-op for the application, unless closing the scanner before it stops advancing.
-