T
- the type of elements held in this collectionpublic class LazyPOrderedSetX<T> extends AbstractLazyPersistentCollection<T,org.pcollections.POrderedSet<T>> implements POrderedSetX<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.Fn1.µ, Fn1.FunctionalOperations<T1,R>
list, seq
Constructor and Description |
---|
LazyPOrderedSetX(org.pcollections.POrderedSet<T> list) |
LazyPOrderedSetX(org.pcollections.POrderedSet<T> list,
ReactiveSeq<T> seq) |
LazyPOrderedSetX(ReactiveSeq<T> seq) |
Modifier and Type | Method and Description |
---|---|
<T1> LazyPOrderedSetX<T1> |
from(java.util.Collection<T1> c)
Conctruct an Extended Collection from a standard Collection
|
T |
get(int index) |
int |
indexOf(java.lang.Object o) |
POrderedSetX<T> |
materialize() |
POrderedSetX<T> |
minus(java.lang.Object remove)
Remove the specified element from this collection
|
POrderedSetX<T> |
minusAll(java.util.Collection<?> list)
Remove all the specified elements from this collection
|
POrderedSetX<T> |
plus(T e)
Add an element to this Collection
|
POrderedSetX<T> |
plusAll(java.util.Collection<? extends T> list)
Add all supplied elements to this Collection
|
POrderedSetX<T> |
plusLoop(int max,
java.util.function.IntFunction<T> value) |
POrderedSetX<T> |
plusLoop(java.util.function.Supplier<java.util.Optional<T>> supplier) |
<R> LazyPOrderedSetX<R> |
unit(java.util.Collection<R> col)
Create a new instance of the same colleciton type from the supplied collection
|
<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, get, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
append, append, cast, coflatMap, combinations, combinations, combine, cycle, cycle, cycleUntil, cycleWhile, deleteBetween, distinct, drop, dropRight, dropUntil, dropWhile, empty, emptyUnit, filter, filterNot, flatMap, flatMapP, flatMapS, forEach2, forEach2, forEach3, forEach3, forEach4, forEach4, fromCollection, fromIterable, fromPublisher, fromStream, 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, permutations, plusInOrder, prepend, prepend, prependS, range, rangeLong, recover, recover, removeAllS, removeAllS, removeAllS, retainAllS, retainAllS, retainAllS, retry, retry, reverse, scanLeft, scanLeft, scanRight, scanRight, shuffle, shuffle, singleton, skip, skipLast, skipUntil, skipWhile, slice, sliding, sliding, sorted, sorted, sorted, stream, take, takeRight, takeUntil, takeWhile, toPOrderedSet, toPOrderedSet, toPOrderedSetX, trampoline, unfold, unit, zip, zip, zip3, zip4, zipS, zipS, zipWithIndex
add, addAll, clear, remove, removeAll, retainAll
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArray
findAny, findFirst, getAtIndex, groupBy, head, headAndTail, isEmpty, iterator, peek, single, single, singleOptional
apply, foldFuture, foldLazy, foldTry, forEach, forEach, forEach, forEach, forEach, runFuture, runLazy, seq, visit
andThen, andThen, bind, compose, functionOps, lift, lift, liftF, liftOpt, liftTry, memoize, memoize, product, reader, λ, λv
apply, applyPartially, applyPartially, curry, curry, from, toFunction
allMatch, anyMatch, avg, avgDouble, avgInt, avgLong, bitAnd, bitAndInt, bitAndLong, bitOr, bitOrInt, bitOrLong, collect, collectable, commonPrefix, commonSuffix, count, count, countDistinct, countDistinct, countDistinctBy, countDistinctBy, max, max, max, max, maxAll, maxAll, maxAll, maxAll, maxAllBy, maxAllBy, maxBy, maxBy, median, median, medianBy, medianBy, min, min, min, min, minAll, minAll, minAll, minAll, minAllBy, minAllBy, minBy, minBy, mode, modeAll, modeAllBy, modeBy, noneMatch, percentile, percentile, percentileBy, percentileBy, sum, sumDouble, sumInt, sumLong, toCollection, toList, toList, toMap, toMap, toSet, toSet, toString, toString
endsWith, 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, reduce, schedule, scheduleFixedDelay, scheduleFixedRate, startsWith, startsWithIterable, toConcurrentLazyCollection, toConcurrentLazyStreamable, toLazyCollection, xMatch
toDequeX, toFutureStream, toFutureStream, toListX, toMapX, toOptional, toPBagX, toPMapX, toPQueueX, toPSetX, toPStackX, toPVectorX, toQueueX, toSetX, toSimpleReact, toSimpleReact, toSortedSetX, toStreamable, toValue
mapToDouble, mapToInt, mapToLong, subscribe, traversable
zip, zip3, zip4, zipP, zipP, zipWith, zipWithP, zipWithS
futureStream, getStreamable, jdkStream, reactiveSeq, reveresedJDKStream, reveresedStream
groupedStatefullyUntilT, groupedT, groupedUntilT, groupedWhileT, slidingT, slidingT
fixedDelay, onePer, xPer
public LazyPOrderedSetX(org.pcollections.POrderedSet<T> list, ReactiveSeq<T> seq)
public LazyPOrderedSetX(org.pcollections.POrderedSet<T> list)
public LazyPOrderedSetX(ReactiveSeq<T> seq)
public POrderedSetX<T> materialize()
materialize
in interface CollectionX<T>
materialize
in interface POrderedSetX<T>
public <T1> LazyPOrderedSetX<T1> from(java.util.Collection<T1> c)
CollectionX
from
in interface CollectionX<T>
from
in interface PersistentCollectionX<T>
from
in interface POrderedSetX<T>
c
- Collection to extendpublic POrderedSetX<T> plus(T e)
FluentCollectionX
plus
in interface FluentCollectionX<T>
plus
in interface POrderedSetX<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 POrderedSetX<T> plusAll(java.util.Collection<? extends T> list)
FluentCollectionX
plusAll
in interface FluentCollectionX<T>
plusAll
in interface POrderedSetX<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 POrderedSetX<T> minusAll(java.util.Collection<?> list)
FluentCollectionX
minusAll
in interface FluentCollectionX<T>
minusAll
in interface POrderedSetX<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 POrderedSetX<T> minus(java.lang.Object remove)
FluentCollectionX
minus
in interface FluentCollectionX<T>
minus
in interface POrderedSetX<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 POrderedSetX<T>
it
- Iterator to create new IterableFunctor frompublic <R> LazyPOrderedSetX<R> unit(java.util.Collection<R> col)
FluentCollectionX
unit
in interface FluentCollectionX<T>
unit
in interface PersistentCollectionX<T>
unit
in interface POrderedSetX<T>
col
- Collection data to populate the new collectionpublic POrderedSetX<T> plusLoop(int max, java.util.function.IntFunction<T> value)
plusLoop
in interface FluentCollectionX<T>
plusLoop
in interface POrderedSetX<T>
plusLoop
in class AbstractLazyPersistentCollection<T,org.pcollections.POrderedSet<T>>
public POrderedSetX<T> plusLoop(java.util.function.Supplier<java.util.Optional<T>> supplier)
plusLoop
in interface FluentCollectionX<T>
plusLoop
in interface POrderedSetX<T>
plusLoop
in class AbstractLazyPersistentCollection<T,org.pcollections.POrderedSet<T>>