T - the type of elements held in this toXpublic class LazyPOrderedSetX<T> extends AbstractLazyPersistentCollection<T,org.pcollections.POrderedSet<T>> implements OrderedSetX<T>
List
Extended List operations execute lazily e.g.
LazyListX<Integer> q = LazyListX.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 lazy operations to be chained and executed more efficiently e.g.
DequeX<Integer> q = DequeX.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.OrderedSetX.CompletableOrderedSetX<T>list, seq| Constructor and Description |
|---|
LazyPOrderedSetX(org.pcollections.POrderedSet<T> list,
ReactiveSeq<T> seq,
Reducer<org.pcollections.POrderedSet<T>> reducer,
Evaluation strict) |
| Modifier and Type | Method and Description |
|---|---|
static <T> java.util.function.Function<ReactiveSeq<org.pcollections.POrderedSet<T>>,org.pcollections.POrderedSet<T>> |
asyncOrderedSet() |
OrderedSetX<T> |
eager() |
<T1> LazyPOrderedSetX<T1> |
from(java.util.Collection<T1> c)
Conctruct an Extended Collection from a standard Collection
|
<X> LazyPOrderedSetX<X> |
fromStream(ReactiveSeq<X> stream)
Reduce a Stream to a OrderedSetX,
|
T |
get(int index) |
int |
indexOf(java.lang.Object o) |
OrderedSetX<T> |
lazy() |
OrderedSetX<T> |
materialize() |
OrderedSetX<T> |
minus(java.lang.Object remove)
Remove the specified element from this toX
|
OrderedSetX<T> |
minusAll(java.util.Collection<?> list)
Remove all the specified elements from this toX
|
OrderedSetX<T> |
plus(T e)
Add an element to this Collection
|
OrderedSetX<T> |
plusAll(java.util.Collection<? extends T> list)
Add all supplied elements to this Collection
|
OrderedSetX<T> |
plusLoop(int max,
java.util.function.IntFunction<T> value) |
OrderedSetX<T> |
plusLoop(java.util.function.Supplier<java.util.Optional<T>> supplier) |
OrderedSetX<T> |
type(Reducer<? extends org.pcollections.POrderedSet<T>> reducer) |
<R> LazyPOrderedSetX<R> |
unit(java.util.Collection<R> col)
Create a new instance of the same colleciton type from the supplied toX
|
<U> LazyPOrderedSetX<U> |
unitIterator(java.util.Iterator<U> it)
Create an IterableFunctor instance of the same type from an Iterator
|
add, addAll, clear, contains, containsAll, equals, evaluation, get, handleStrict, hashCode, isEager, isEmpty, isLazy, isMaterialized, iterator, materializeList, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toString, unwrapclone, finalize, getClass, notify, notifyAll, wait, wait, waitanyM, append, append, cast, coflatMap, combinations, combinations, combine, combine, completable, cycle, cycle, cycleUntil, cycleWhile, deleteBetween, distinct, drop, dropRight, dropUntil, dropWhile, empty, emptyUnit, filter, filterNot, flatMap, flatMapP, flatMapS, forEach2, forEach2, forEach3, forEach3, forEach4, forEach4, fromIterable, fromIterator, fromPublisher, generate, grouped, grouped, grouped, grouped, groupedStatefullyUntil, groupedUntil, groupedUntil, groupedWhile, groupedWhile, insertAt, insertAtS, intersperse, iterate, limit, limitLast, limitUntil, limitWhile, map, monoid, narrow, notNull, of, ofType, onEmpty, onEmptyGet, onEmptySwitch, onEmptyThrow, orderedSetX, permutations, plusInOrder, prepend, prepend, prependS, 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, toPOrderedSet, trampoline, unfold, unit, zip, zip, zip, zip3, zip3, zip4, zip4, zipP, zipP, zipS, zipS, zipWith, zipWithIndex, zipWithP, zipWithSadd, addAll, clear, remove, removeAll, retainAlladd, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArrayflatMapP, reduceevaluation, findAny, findFirst, fromCollection, getAtIndex, groupBy, head, headAndTail, isEager, isEmpty, isLazy, isMaterialized, iterator, materializeReversed, peek, 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, xPerunwrap, unwrapIfInstance, unwrapNestedpublic LazyPOrderedSetX(org.pcollections.POrderedSet<T> list, ReactiveSeq<T> seq, Reducer<org.pcollections.POrderedSet<T>> reducer, Evaluation strict)
public static final <T> java.util.function.Function<ReactiveSeq<org.pcollections.POrderedSet<T>>,org.pcollections.POrderedSet<T>> asyncOrderedSet()
public OrderedSetX<T> materialize()
materialize in interface CollectionX<T>materialize in interface OrderedSetX<T>public OrderedSetX<T> type(Reducer<? extends org.pcollections.POrderedSet<T>> reducer)
type in interface OrderedSetX<T>public <X> LazyPOrderedSetX<X> fromStream(ReactiveSeq<X> stream)
OrderedSetX
OrderedSetX<Integer> set = OrderedSetX.fromStream(Stream.of(1,2,3));
//set = [1,2,3]
fromStream in interface LazyCollectionX<T>fromStream in interface OrderedSetX<T>stream - to convertpublic <T1> LazyPOrderedSetX<T1> from(java.util.Collection<T1> c)
CollectionXfrom in interface CollectionX<T>from in interface OrderedSetX<T>c - Collection to extendpublic OrderedSetX<T> lazy()
lazy in interface CollectionX<T>lazy in interface OrderedSetX<T>public OrderedSetX<T> eager()
eager in interface CollectionX<T>eager in interface OrderedSetX<T>public OrderedSetX<T> plus(T e)
FluentCollectionXplus in interface FluentCollectionX<T>plus in interface LazyCollectionX<T>plus in interface OrderedSetX<T>plus in interface org.pcollections.PCollection<T>plus in interface org.pcollections.POrderedSet<T>plus in interface org.pcollections.PSet<T>e - Element to addpublic OrderedSetX<T> plusAll(java.util.Collection<? extends T> list)
FluentCollectionXplusAll in interface FluentCollectionX<T>plusAll in interface LazyCollectionX<T>plusAll in interface OrderedSetX<T>plusAll in interface org.pcollections.PCollection<T>plusAll in interface org.pcollections.POrderedSet<T>plusAll in interface org.pcollections.PSet<T>list - of elements to addpublic OrderedSetX<T> minusAll(java.util.Collection<?> list)
FluentCollectionXminusAll in interface FluentCollectionX<T>minusAll in interface LazyCollectionX<T>minusAll in interface OrderedSetX<T>minusAll in interface org.pcollections.PCollection<T>minusAll in interface org.pcollections.POrderedSet<T>minusAll in interface org.pcollections.PSet<T>list - of elements to removepublic int indexOf(java.lang.Object o)
indexOf in interface org.pcollections.POrderedSet<T>public OrderedSetX<T> minus(java.lang.Object remove)
FluentCollectionXminus in interface FluentCollectionX<T>minus in interface LazyCollectionX<T>minus in interface OrderedSetX<T>minus in interface org.pcollections.PCollection<T>minus in interface org.pcollections.POrderedSet<T>minus in interface org.pcollections.PSet<T>remove - Element to removepublic <U> LazyPOrderedSetX<U> unitIterator(java.util.Iterator<U> it)
Traversable
ReactiveSeq<Integer> newSeq = seq.unitIterable(myIterator);
unitIterator in interface Traversable<T>unitIterator in interface OrderedSetX<T>it - Iterator to create new IterableFunctor frompublic <R> LazyPOrderedSetX<R> unit(java.util.Collection<R> col)
FluentCollectionXunit in interface FluentCollectionX<T>unit in interface OrderedSetX<T>col - Collection data to populate the new toXpublic OrderedSetX<T> plusLoop(int max, java.util.function.IntFunction<T> value)
plusLoop in interface FluentCollectionX<T>plusLoop in interface OrderedSetX<T>plusLoop in class AbstractLazyPersistentCollection<T,org.pcollections.POrderedSet<T>>public OrderedSetX<T> plusLoop(java.util.function.Supplier<java.util.Optional<T>> supplier)
plusLoop in interface FluentCollectionX<T>plusLoop in interface OrderedSetX<T>plusLoop in class AbstractLazyPersistentCollection<T,org.pcollections.POrderedSet<T>>