T - the type of elements held in this toXpublic class LazyQueueX<T> extends AbstractLazyCollection<T,java.util.Queue<T>> implements QueueX<T>
List
Extended List operations execute lazily e.g.
QueueX<Integer> q = QueueX.of(1,2,3)
.map(i->i*2);
The map operation above is not executed immediately. It will only be executed when (if) the data inside the
queue is accessed. This allows maybe operations to be chained and executed more efficiently e.g.
QueueX<Integer> q = QueueX.of(1,2,3)
.map(i->i*2);
.filter(i->i<5);
The operation above is more efficient than the equivalent operation with a ListX.QueueX.CompletableQueueX<T>, QueueX.Instances| Constructor and Description |
|---|
LazyQueueX(java.util.Queue<T> list,
java.util.stream.Collector<T,?,java.util.Queue<T>> collector,
Evaluation strict) |
LazyQueueX(java.util.Queue<T> list,
ReactiveSeq<T> seq,
java.util.stream.Collector<T,?,java.util.Queue<T>> collector,
Evaluation strict) |
LazyQueueX(ReactiveSeq<T> seq,
java.util.stream.Collector<T,?,java.util.Queue<T>> collector,
Evaluation strict) |
| Modifier and Type | Method and Description |
|---|---|
static <T> java.util.function.Function<ReactiveSeq<java.util.Queue<T>>,java.util.Queue<T>> |
asyncQueue() |
QueueX<T> |
eager() |
T |
element() |
<T1> LazyQueueX<T1> |
from(java.util.Collection<T1> c)
Conctruct an Extended Collection from a standard Collection
|
<X> LazyQueueX<X> |
fromStream(ReactiveSeq<X> stream) |
<T1> java.util.stream.Collector<T1,?,java.util.Queue<T1>> |
getCollector() |
QueueX<T> |
lazy() |
QueueX<T> |
materialize() |
boolean |
offer(T t) |
T |
peek() |
T |
poll() |
T |
remove() |
QueueX<T> |
type(java.util.stream.Collector<T,?,java.util.Queue<T>> collector) |
<R> LazyQueueX<R> |
unit(java.util.Collection<R> col)
Create a new instance of the same colleciton type from the supplied toX
|
<U> LazyQueueX<U> |
unitIterator(java.util.Iterator<U> it)
Create an IterableFunctor instance of the same type from an Iterator
|
LazyQueueX<T> |
withCollector(java.util.stream.Collector<T,?,java.util.Queue<T>> collector) |
add, addAll, clear, contains, containsAll, equals, evaluation, get, handleStrict, hashCode, isEager, isEmpty, isLazy, isMaterialized, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toString, unwrapclone, finalize, getClass, notify, notifyAll, wait, wait, waitallTypeclasses, anyM, append, append, cast, coflatMap, combine, combine, completable, coproduct, cycle, cycle, cycleUntil, cycleWhile, defaultCollector, defer, deleteBetween, distinct, drop, dropRight, dropUntil, dropWhile, empty, fill, filter, filterNot, flatMap, flatMapP, flatMapS, forEach2, forEach2, forEach3, forEach3, forEach4, forEach4, fromIterable, fromIterable, fromIterator, fromPublisher, generate, grouped, grouped, grouped, grouped, groupedStatefullyUntil, groupedUntil, groupedUntil, groupedWhile, groupedWhile, insertAt, insertAtS, intersperse, iterate, kindCokleisli, kindKleisli, limit, limitLast, limitUntil, limitWhile, map, mapM, minus, minusAll, narrow, narrowK, nested, notNull, of, ofType, onEmpty, onEmptyGet, onEmptySwitch, onEmptyThrow, peek, plus, plusAll, plusLoop, plusLoop, prepend, prepend, prependS, product, queueX, range, rangeLong, recover, recover, removeAll, removeAllI, removeAllS, retainAll, retainAllI, retainAllS, retry, retry, reverse, scanLeft, scanLeft, scanRight, scanRight, shuffle, shuffle, singleton, skip, skipLast, skipUntil, skipWhile, slice, sliding, sliding, sorted, sorted, sorted, stream, tailRec, take, takeRight, takeUntil, takeWhile, trampoline, unfold, unit, widen, widen2, zip, zip, zip, zip3, zip3, zip4, zip4, zipP, zipP, zipS, zipS, zipWith, zipWithIndex, zipWithP, zipWithScombinations, combinations, flatMapP, permutations, reduceplusInOrderevaluation, findAny, findFirst, fromCollection, getAtIndex, groupBy, head, headAndTail, isEager, isLazy, isMaterialized, materializeReversed, single, single, singleUnsafe, takeOne, toXasFunction, foldFuture, foldLazy, foldTry, forEach, forEach, forEach, forEach, forEach, forEachSubscribe, forEachSubscribe, forEachSubscribe, runFuture, runLazy, seq, toListX, toSetX, visitallMatch, anyMatch, collect, collectors, commonPrefix, commonSuffix, count, count, countDistinct, countDistinct, countDistinctBy, countDistinctBy, max, maxBy, min, minBy, mode, noneMatch, sum, sumDouble, sumInt, sumLong, to, toList, toMap, toMap, toSet, toString, toStringendsWith, endsWithIterable, firstValue, foldLeft, foldLeft, foldLeft, foldLeft, foldRight, foldRight, foldRight, foldRightMapToType, get, join, join, join, mapReduce, mapReduce, print, print, printErr, printOut, reduce, reduce, reduce, reduce, reduce, reduce, schedule, scheduleFixedDelay, scheduleFixedRate, startsWith, startsWithIterable, xMatchmapToDouble, mapToInt, mapToLong, subscribe, traversablegroupedStatefullyUntilT, groupedT, groupedUntilT, groupedWhileT, slidingT, slidingTfixedDelay, onePer, xPeraddAll, clear, contains, containsAll, equals, hashCode, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, toArray, toArrayunwrap, unwrapIfInstance, unwrapNestedpublic LazyQueueX(java.util.Queue<T> list, ReactiveSeq<T> seq, java.util.stream.Collector<T,?,java.util.Queue<T>> collector, Evaluation strict)
public LazyQueueX(java.util.Queue<T> list, java.util.stream.Collector<T,?,java.util.Queue<T>> collector, Evaluation strict)
public LazyQueueX(ReactiveSeq<T> seq, java.util.stream.Collector<T,?,java.util.Queue<T>> collector, Evaluation strict)
public static final <T> java.util.function.Function<ReactiveSeq<java.util.Queue<T>>,java.util.Queue<T>> asyncQueue()
public LazyQueueX<T> withCollector(java.util.stream.Collector<T,?,java.util.Queue<T>> collector)
withCollector in interface QueueX<T>public QueueX<T> materialize()
materialize in interface CollectionX<T>materialize in interface QueueX<T>materialize in class AbstractLazyCollection<T,java.util.Queue<T>>public <T1> java.util.stream.Collector<T1,?,java.util.Queue<T1>> getCollector()
getCollector in interface QueueX<T>public <X> LazyQueueX<X> fromStream(ReactiveSeq<X> stream)
fromStream in interface LazyCollectionX<T>fromStream in interface QueueX<T>stream - Create a MultableCollectionX from a Streampublic <T1> LazyQueueX<T1> from(java.util.Collection<T1> c)
CollectionXpublic <U> LazyQueueX<U> unitIterator(java.util.Iterator<U> it)
Traversable
ReactiveSeq<Integer> newSeq = seq.unitIterable(myIterator);
unitIterator in interface Traversable<T>unitIterator in interface QueueX<T>it - Iterator to create new IterableFunctor frompublic <R> LazyQueueX<R> unit(java.util.Collection<R> col)
FluentCollectionX