T
- the type of elements held in this toXpublic class LazySortedSetX<T> extends AbstractLazyCollection<T,java.util.SortedSet<T>> implements SortedSetX<T>
List
Extended Set operations execute lazily e.g.
SortedSetX<Integer> q = SortedSetX.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.
SortedSetX<Integer> q = SortedSetX.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.SortedSetX.Comparables, SortedSetX.CompletableSortedSetX<T>
Constructor and Description |
---|
LazySortedSetX(ReactiveSeq<T> seq,
java.util.stream.Collector<T,?,java.util.SortedSet<T>> collector,
Evaluation strict) |
LazySortedSetX(java.util.SortedSet<T> list,
java.util.stream.Collector<T,?,java.util.SortedSet<T>> collector,
Evaluation strict) |
LazySortedSetX(java.util.SortedSet<T> list,
ReactiveSeq<T> seq,
java.util.stream.Collector<T,?,java.util.SortedSet<T>> collector,
Evaluation strict) |
Modifier and Type | Method and Description |
---|---|
static <T> java.util.function.Function<ReactiveSeq<java.util.SortedSet<T>>,java.util.SortedSet<T>> |
asyncSortedSet() |
java.util.Comparator<? super T> |
comparator() |
SortedSetX<T> |
eager() |
T |
first() |
<T1> LazySortedSetX<T1> |
from(java.util.Collection<T1> c)
Conctruct an Extended Collection from a standard Collection
|
<X> LazySortedSetX<X> |
fromStream(ReactiveSeq<X> stream) |
<T1> java.util.stream.Collector<T1,?,java.util.SortedSet<T1>> |
getCollector() |
java.util.SortedSet<T> |
headSet(T toElement) |
T |
last() |
SortedSetX<T> |
lazy() |
SortedSetX<T> |
materialize() |
java.util.SortedSet<T> |
subSet(T fromElement,
T toElement) |
java.util.SortedSet<T> |
tailSet(T fromElement) |
LazySortedSetX<T> |
type(java.util.stream.Collector<T,?,java.util.SortedSet<T>> collector) |
<R> LazySortedSetX<R> |
unit(java.util.Collection<R> col)
Create a new instance of the same colleciton type from the supplied toX
|
<U> LazySortedSetX<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, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toString, unwrap
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
anyM, append, append, cast, coflatMap, combinations, combinations, combine, combine, completable, cycle, cycle, cycleUntil, cycleWhile, defaultCollector, defer, deleteBetween, distinct, drop, dropRight, dropUntil, dropWhile, empty, 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, immutableCollector, insertAt, insertAtS, intersperse, iterate, limit, limitLast, limitUntil, limitWhile, map, minus, minusAll, narrow, notNull, of, ofType, onEmpty, onEmptyGet, onEmptySwitch, onEmptyThrow, permutations, plus, plusAll, plusLoop, plusLoop, 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, sortedSetX, stream, tailRec, take, takeRight, takeUntil, takeWhile, trampoline, unfold, unit, zip, zip, zip, zip3, zip3, zip4, zip4, zipP, zipP, zipS, zipS, zipWith, zipWithIndex, zipWithP, zipWithS
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
flatMapP, reduce
plusInOrder
evaluation, findAny, findFirst, fromCollection, getAtIndex, groupBy, head, headAndTail, isEager, isLazy, isMaterialized, materializeReversed, peek, single, single, singleUnsafe, takeOne, toX
asFunction, foldFuture, foldLazy, foldTry, forEach, forEach, forEach, forEach, forEach, forEachSubscribe, forEachSubscribe, forEachSubscribe, runFuture, runLazy, seq, toListX, toSetX, visit
allMatch, 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, 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, schedule, scheduleFixedDelay, scheduleFixedRate, startsWith, startsWithIterable, xMatch
mapToDouble, mapToInt, mapToLong, subscribe, traversable
groupedStatefullyUntilT, groupedT, groupedUntilT, groupedWhileT, slidingT, slidingT
fixedDelay, onePer, xPer
unwrap, unwrapIfInstance, unwrapNested
public LazySortedSetX(java.util.SortedSet<T> list, ReactiveSeq<T> seq, java.util.stream.Collector<T,?,java.util.SortedSet<T>> collector, Evaluation strict)
public LazySortedSetX(java.util.SortedSet<T> list, java.util.stream.Collector<T,?,java.util.SortedSet<T>> collector, Evaluation strict)
public LazySortedSetX(ReactiveSeq<T> seq, java.util.stream.Collector<T,?,java.util.SortedSet<T>> collector, Evaluation strict)
public static final <T> java.util.function.Function<ReactiveSeq<java.util.SortedSet<T>>,java.util.SortedSet<T>> asyncSortedSet()
public SortedSetX<T> lazy()
lazy
in interface CollectionX<T>
lazy
in interface SortedSetX<T>
public SortedSetX<T> eager()
eager
in interface CollectionX<T>
eager
in interface SortedSetX<T>
public LazySortedSetX<T> type(java.util.stream.Collector<T,?,java.util.SortedSet<T>> collector)
type
in interface SortedSetX<T>
public SortedSetX<T> materialize()
materialize
in interface CollectionX<T>
materialize
in interface SortedSetX<T>
materialize
in class AbstractLazyCollection<T,java.util.SortedSet<T>>
public <T1> java.util.stream.Collector<T1,?,java.util.SortedSet<T1>> getCollector()
getCollector
in interface SortedSetX<T>
public <X> LazySortedSetX<X> fromStream(ReactiveSeq<X> stream)
fromStream
in interface LazyCollectionX<T>
fromStream
in interface SortedSetX<T>
stream
- Create a MultableCollectionX from a Streampublic <T1> LazySortedSetX<T1> from(java.util.Collection<T1> c)
CollectionX
from
in interface CollectionX<T>
from
in interface SortedSetX<T>
c
- Collection to extendpublic <U> LazySortedSetX<U> unitIterator(java.util.Iterator<U> it)
Traversable
ReactiveSeq<Integer> newSeq = seq.unitIterable(myIterator);
unitIterator
in interface Traversable<T>
unitIterator
in interface SortedSetX<T>
it
- Iterator to create new IterableFunctor frompublic <R> LazySortedSetX<R> unit(java.util.Collection<R> col)
FluentCollectionX
unit
in interface FluentCollectionX<T>
unit
in interface SortedSetX<T>
col
- Collection data to populate the new toXpublic java.util.Comparator<? super T> comparator()
comparator
in interface java.util.SortedSet<T>
public java.util.SortedSet<T> subSet(T fromElement, T toElement)
subSet
in interface java.util.SortedSet<T>
public java.util.SortedSet<T> headSet(T toElement)
headSet
in interface java.util.SortedSet<T>
public java.util.SortedSet<T> tailSet(T fromElement)
tailSet
in interface java.util.SortedSet<T>