public interface PMapX<K,V> extends org.pcollections.PMap<K,V>, FluentMapX<K,V>, BiFunctor<K,V>, Functor<V>, IterableFilterable<org.jooq.lambda.tuple.Tuple2<K,V>>, ExtendedTraversable<org.jooq.lambda.tuple.Tuple2<K,V>>, Foldable<org.jooq.lambda.tuple.Tuple2<K,V>>, CyclopsCollectable<org.jooq.lambda.tuple.Tuple2<K,V>>, IterableCollectable<org.jooq.lambda.tuple.Tuple2<K,V>>
Modifier and Type | Method and Description |
---|---|
default <U1,U2> PMapX<U1,U2> |
bicast(java.lang.Class<U1> type1,
java.lang.Class<U2> type2)
Cast all elements in a stream to a given type, possibly throwing a
ClassCastException . |
default <R1,R2> PMapX<R1,R2> |
bimap(java.util.function.Function<? super K,? extends R1> fn1,
java.util.function.Function<? super V,? extends R2> fn2) |
default PMapX<K,V> |
bipeek(java.util.function.Consumer<? super K> c1,
java.util.function.Consumer<? super V> c2) |
default <R1,R2> PMapX<R1,R2> |
bitrampoline(java.util.function.Function<? super K,? extends Trampoline<? extends R1>> mapper1,
java.util.function.Function<? super V,? extends Trampoline<? extends R2>> mapper2)
Performs a map operation that can call a recursive method without running out of stack space
|
default <U> PMapX<K,U> |
cast(java.lang.Class<U> type)
Cast all elements in a stream to a given type, possibly throwing a
ClassCastException . |
default org.jooq.lambda.Collectable<org.jooq.lambda.tuple.Tuple2<K,V>> |
collectable()
Narrow this class to a Collectable
|
static <K,V> PMapX<K,V> |
empty() |
default PMapX<K,V> |
filter(java.util.function.Predicate<? super org.jooq.lambda.tuple.Tuple2<K,V>> fn) |
default PMapX<K,V> |
filterNot(java.util.function.Predicate<? super org.jooq.lambda.tuple.Tuple2<K,V>> fn) |
static <K,V> PMapX<K,V> |
fromMap(java.util.Map<? extends K,? extends V> map) |
default java.util.Iterator<org.jooq.lambda.tuple.Tuple2<K,V>> |
iterator() |
default <R> PMapX<K,R> |
map(java.util.function.Function<? super V,? extends R> fn) |
PMapX<K,V> |
minus(java.lang.Object key) |
PMapX<K,V> |
minusAll(java.util.Collection<?> keys) |
default PMapX<K,V> |
notNull() |
default PMapX<K,V> |
peek(java.util.function.Consumer<? super V> c) |
PMapX<K,V> |
plus(K key,
V value) |
PMapX<K,V> |
plusAll(java.util.Map<? extends K,? extends V> map) |
default PMapX<K,V> |
removeAll(java.lang.Iterable<org.jooq.lambda.tuple.Tuple2<K,V>> it) |
default PMapX<K,V> |
removeAll(java.util.stream.Stream<org.jooq.lambda.tuple.Tuple2<K,V>> stream) |
default PMapX<K,V> |
removeAll(org.jooq.lambda.tuple.Tuple2<K,V>... values) |
default PMapX<K,V> |
retainAll(java.lang.Iterable<org.jooq.lambda.tuple.Tuple2<K,V>> it) |
default PMapX<K,V> |
retainAll(java.util.stream.Stream<org.jooq.lambda.tuple.Tuple2<K,V>> stream) |
default PMapX<K,V> |
retainAll(org.jooq.lambda.tuple.Tuple2<K,V>... values) |
static <K,V> PMapX<K,V> |
singleton(K key,
V value) |
default ReactiveSeq<org.jooq.lambda.tuple.Tuple2<K,V>> |
stream() |
default <R> PMapX<K,R> |
trampoline(java.util.function.Function<? super V,? extends Trampoline<? extends R>> mapper)
Performs a map operation that can call a recursive method without running out of stack space
|
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, values
patternMatch
ofType
combinations, combinations, permutations
combine, cycle, cycle, cycleUntil, cycleWhile, distinct, dropRight, dropUntil, dropWhile, endsWith, endsWithIterable, findAny, findFirst, firstValue, futureOperations, get, groupBy, grouped, grouped, grouped, grouped, groupedStatefullyWhile, groupedUntil, groupedUntil, groupedWhile, groupedWhile, headAndTail, intersperse, join, join, join, lazyOperations, limit, limitLast, limitUntil, limitWhile, onEmpty, onEmptyGet, onEmptyThrow, reverse, scanLeft, scanLeft, scanRight, scanRight, schedule, scheduleFixedDelay, scheduleFixedRate, shuffle, shuffle, single, single, singleOptional, skip, skipLast, skipUntil, skipWhile, slice, sliding, sliding, sorted, sorted, sorted, startsWith, startsWithIterable, subscribe, takeRight, takeUntil, takeWhile, toConcurrentLazyCollection, toConcurrentLazyStreamable, toLazyCollection, validate, visit, visit, zip, zip, zip3, zip4, zipStream, zipWithIndex
foldRight, foldRight, foldRight, foldRightMapToType, mapReduce, mapReduce, print, print, printErr, printOut, reduce, reduce, reduce, reduce, reduce, reduce, reduce
seq, toCompletableFuture, toDequeX, toEvalAlways, toEvalLater, toEvalNow, toFutureStream, toFutureStream, toFutureW, toIor, toIorSecondary, toListX, toMapX, toMaybe, toOptional, toPBagX, toPMapX, toPOrderedSetX, toPQueueX, toPSetX, toPStackX, toPVectorX, toQueueX, toSetX, toSimpleReact, toSimpleReact, toSortedSetX, toStreamable, toTry, toValue, toValueMap, toValueSet, toXor, toXorSecondary
allMatch, anyMatch, avg, avg, avgDouble, avgInt, avgLong, collect, count, count, countDistinct, countDistinct, countDistinctBy, countDistinctBy, max, max, max, max, maxBy, maxBy, median, median, medianBy, medianBy, min, min, min, min, minBy, minBy, mode, noneMatch, percentile, percentile, percentileBy, percentileBy, sum, sum, sumDouble, sumInt, sumLong, toCollection, toList, toList, toMap, toSet, toSet, toString, toString
collect, collect, collect, collect, collect, collect, collect, collect, collect, collect, collect, collect, collect, collect, collect
xMatch
static <K,V> PMapX<K,V> empty()
static <K,V> PMapX<K,V> singleton(K key, V value)
static <K,V> PMapX<K,V> fromMap(java.util.Map<? extends K,? extends V> map)
default org.jooq.lambda.Collectable<org.jooq.lambda.tuple.Tuple2<K,V>> collectable()
CyclopsCollectable
collectable
in interface CyclopsCollectable<org.jooq.lambda.tuple.Tuple2<K,V>>
default ReactiveSeq<org.jooq.lambda.tuple.Tuple2<K,V>> stream()
stream
in interface ConvertableSequence<org.jooq.lambda.tuple.Tuple2<K,V>>
stream
in interface Foldable<org.jooq.lambda.tuple.Tuple2<K,V>>
stream
in interface IterableCollectable<org.jooq.lambda.tuple.Tuple2<K,V>>
stream
in interface Traversable<org.jooq.lambda.tuple.Tuple2<K,V>>
default <R1,R2> PMapX<R1,R2> bimap(java.util.function.Function<? super K,? extends R1> fn1, java.util.function.Function<? super V,? extends R2> fn2)
default PMapX<K,V> bipeek(java.util.function.Consumer<? super K> c1, java.util.function.Consumer<? super V> c2)
default <U1,U2> PMapX<U1,U2> bicast(java.lang.Class<U1> type1, java.lang.Class<U2> type2)
BiFunctor
ClassCastException
.
// ClassCastException ReactiveSeq.of(1, "a", 2, "b", 3).cast(Integer.class)default <R1,R2> PMapX<R1,R2> bitrampoline(java.util.function.Function<? super K,? extends Trampoline<? extends R1>> mapper1, java.util.function.Function<? super V,? extends Trampoline<? extends R2>> mapper2)
BiFunctor
ReactiveSeq.of(10,20,30,40)
.trampoline(i-> fibonacci(i))
.forEach(System.out::println);
Trampoline<Long> fibonacci(int i){
return fibonacci(i,1,0);
}
Trampoline<Long> fibonacci(int n, long a, long b) {
return n == 0 ? Trampoline.done(b) : Trampoline.more( ()->fibonacci(n-1, a+b, a));
}
55
6765
832040
102334155
ReactiveSeq.of(10_000,200_000,3_000_000,40_000_000)
.trampoline(i-> fibonacci(i))
.forEach(System.out::println);
completes successfully
bitrampoline
in interface BiFunctor<K,V>
default <U> PMapX<K,U> cast(java.lang.Class<U> type)
Functor
ClassCastException
.
// ClassCastException ReactiveSeq.of(1, "a", 2, "b", 3).cast(Integer.class)default <R> PMapX<K,R> trampoline(java.util.function.Function<? super V,? extends Trampoline<? extends R>> mapper)
Functor
ReactiveSeq.of(10,20,30,40)
.trampoline(i-> fibonacci(i))
.forEach(System.out::println);
Trampoline<Long> fibonacci(int i){
return fibonacci(i,1,0);
}
Trampoline<Long> fibonacci(int n, long a, long b) {
return n == 0 ? Trampoline.done(b) : Trampoline.more( ()->fibonacci(n-1, a+b, a));
}
55
6765
832040
102334155
ReactiveSeq.of(10_000,200_000,3_000_000,40_000_000)
.trampoline(i-> fibonacci(i))
.forEach(System.out::println);
completes successfully
trampoline
in interface Functor<V>
default PMapX<K,V> filter(java.util.function.Predicate<? super org.jooq.lambda.tuple.Tuple2<K,V>> fn)
filter
in interface Filterable<org.jooq.lambda.tuple.Tuple2<K,V>>
default PMapX<K,V> filterNot(java.util.function.Predicate<? super org.jooq.lambda.tuple.Tuple2<K,V>> fn)
filterNot
in interface Filterable<org.jooq.lambda.tuple.Tuple2<K,V>>
default PMapX<K,V> notNull()
notNull
in interface Filterable<org.jooq.lambda.tuple.Tuple2<K,V>>
default PMapX<K,V> removeAll(java.util.stream.Stream<org.jooq.lambda.tuple.Tuple2<K,V>> stream)
removeAll
in interface IterableFilterable<org.jooq.lambda.tuple.Tuple2<K,V>>
default PMapX<K,V> removeAll(java.lang.Iterable<org.jooq.lambda.tuple.Tuple2<K,V>> it)
removeAll
in interface IterableFilterable<org.jooq.lambda.tuple.Tuple2<K,V>>
default PMapX<K,V> removeAll(org.jooq.lambda.tuple.Tuple2<K,V>... values)
removeAll
in interface IterableFilterable<org.jooq.lambda.tuple.Tuple2<K,V>>
default PMapX<K,V> retainAll(java.lang.Iterable<org.jooq.lambda.tuple.Tuple2<K,V>> it)
retainAll
in interface IterableFilterable<org.jooq.lambda.tuple.Tuple2<K,V>>
default PMapX<K,V> retainAll(java.util.stream.Stream<org.jooq.lambda.tuple.Tuple2<K,V>> stream)
retainAll
in interface IterableFilterable<org.jooq.lambda.tuple.Tuple2<K,V>>