public class PMapXImpl<K,V> extends java.lang.Object implements PersistentMapX<K,V>
Constructor and Description |
---|
PMapXImpl() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Deprecated.
|
V |
compute(K key,
java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction)
Deprecated.
|
V |
computeIfAbsent(K key,
java.util.function.Function<? super K,? extends V> mappingFunction)
Deprecated.
|
V |
computeIfPresent(K key,
java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction)
Deprecated.
|
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(java.util.function.BiConsumer<? super K,? super V> action) |
<X extends java.lang.Throwable> |
forEach(java.util.function.Consumer<? super org.jooq.lambda.tuple.Tuple2<K,V>> consumerElement,
java.util.function.Consumer<? super java.lang.Throwable> consumerError)
Perform a forEach operation over the Stream capturing any elements and errors in the supplied consumers,
|
<X extends java.lang.Throwable> |
forEach(java.util.function.Consumer<? super org.jooq.lambda.tuple.Tuple2<K,V>> consumerElement,
java.util.function.Consumer<? super java.lang.Throwable> consumerError,
java.lang.Runnable onComplete)
Perform a forEach operation over the Stream capturing any elements and errors in the supplied consumers
when the entire Stream has been processed an onComplete event will be recieved.
|
<X extends java.lang.Throwable> |
forEach(long numberOfElements,
java.util.function.Consumer<? super org.jooq.lambda.tuple.Tuple2<K,V>> consumer)
Perform a forEach operation over the Stream, without closing it, consuming only the specified number of elements from
the Stream, at this time.
|
<X extends java.lang.Throwable> |
forEach(long numberOfElements,
java.util.function.Consumer<? super org.jooq.lambda.tuple.Tuple2<K,V>> consumer,
java.util.function.Consumer<? super java.lang.Throwable> consumerError)
Perform a forEach operation over the Stream without closing it, capturing any elements and errors in the supplied consumers, but only consuming
the specified number of elements from the Stream, at this time.
|
<X extends java.lang.Throwable> |
forEach(long numberOfElements,
java.util.function.Consumer<? super org.jooq.lambda.tuple.Tuple2<K,V>> consumer,
java.util.function.Consumer<? super java.lang.Throwable> consumerError,
java.lang.Runnable onComplete)
Perform a forEach operation over the Stream without closing it, capturing any elements and errors in the supplied consumers, but only consuming
the specified number of elements from the Stream, at this time.
|
<X extends java.lang.Throwable> |
forEachSubscribe(java.util.function.Consumer<? super org.jooq.lambda.tuple.Tuple2<K,V>> consumer)
Perform a forEach operation over the Stream, without closing it, consuming only the specified number of elements from
the Stream, at this time.
|
<X extends java.lang.Throwable> |
forEachSubscribe(java.util.function.Consumer<? super org.jooq.lambda.tuple.Tuple2<K,V>> consumer,
java.util.function.Consumer<? super java.lang.Throwable> consumerError)
Perform a forEach operation over the Stream without closing it, capturing any elements and errors in the supplied consumers, but only consuming
the specified number of elements from the Stream, at this time.
|
<X extends java.lang.Throwable> |
forEachSubscribe(java.util.function.Consumer<? super org.jooq.lambda.tuple.Tuple2<K,V>> consumer,
java.util.function.Consumer<? super java.lang.Throwable> consumerError,
java.lang.Runnable onComplete)
Perform a forEach operation over the Stream without closing it, capturing any elements and errors in the supplied consumers, but only consuming
the specified number of elements from the Stream, at this time.
|
V |
get(java.lang.Object key) |
V |
getOrDefault(java.lang.Object key,
V defaultValue) |
int |
hashCode() |
boolean |
isEmpty() |
SetX<K> |
keySet() |
V |
merge(K key,
V value,
java.util.function.BiFunction<? super V,? super V,? extends V> remappingFunction)
Deprecated.
|
PersistentMapX<K,V> |
minus(java.lang.Object key) |
PersistentMapX<K,V> |
minusAll(java.util.Collection<?> keys) |
PersistentMapX<K,V> |
plus(K key,
V value) |
PersistentMapX<K,V> |
plusAll(java.util.Map<? extends K,? extends V> map) |
V |
put(K k,
V v)
Deprecated.
|
void |
putAll(java.util.Map<? extends K,? extends V> m)
Deprecated.
|
V |
putIfAbsent(K key,
V value)
Deprecated.
|
V |
remove(java.lang.Object k)
Deprecated.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value)
Deprecated.
|
V |
replace(K key,
V value)
Deprecated.
|
boolean |
replace(K key,
V oldValue,
V newValue)
Deprecated.
|
void |
replaceAll(java.util.function.BiFunction<? super K,? super V,? extends V> function)
Deprecated.
|
int |
size() |
<R> R |
unwrap()
Unwrap a wrapped value
|
CollectionX<V> |
values() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
bicast, bimap, bipeek, bitrampoline, cast, empty, filter, filterNot, fromMap, fromStream, iterator, map, notNull, onEmpty, onEmptyGet, onEmptySwitch, onEmptyThrow, peek, removeAll, removeAllI, removeAllS, retainAll, retainAllI, retainAllS, singleton, stream, subscribe, toBagX, toLinkedListX, toListX, toOrderedSetX, toPersistentQueueX, toPersistentSetX, toVectorX, trampoline
unwrapIfInstance, unwrapNested
retry, retry
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, findAny, findFirst, firstValue, foldLeft, foldLeft, foldLeft, foldLeft, foldRight, foldRight, foldRight, foldRightMapToType, get, groupBy, join, join, join, mapReduce, mapReduce, print, print, printErr, printOut, reduce, reduce, reduce, reduce, reduce, reduce, reduce, schedule, scheduleFixedDelay, scheduleFixedRate, single, single, singleOptional, startsWith, startsWithIterable, xMatch
public <R> R unwrap()
Unwrapable
unwrap
in interface Unwrapable
public PersistentMapX<K,V> plus(K key, V value)
plus
in interface FluentMapX<K,V>
plus
in interface PersistentMapX<K,V>
plus
in interface org.pcollections.PMap<K,V>
key
- value
- PMap.plus(java.lang.Object, java.lang.Object)
public PersistentMapX<K,V> plusAll(java.util.Map<? extends K,? extends V> map)
plusAll
in interface FluentMapX<K,V>
plusAll
in interface PersistentMapX<K,V>
plusAll
in interface org.pcollections.PMap<K,V>
map
- PMap.plusAll(java.util.Map)
public PersistentMapX<K,V> minus(java.lang.Object key)
minus
in interface FluentMapX<K,V>
minus
in interface PersistentMapX<K,V>
minus
in interface org.pcollections.PMap<K,V>
key
- PMap.minus(java.lang.Object)
public PersistentMapX<K,V> minusAll(java.util.Collection<?> keys)
minusAll
in interface FluentMapX<K,V>
minusAll
in interface PersistentMapX<K,V>
minusAll
in interface org.pcollections.PMap<K,V>
keys
- PMap.minusAll(java.util.Collection)
@Deprecated public V remove(java.lang.Object k)
@Deprecated public void clear()
public int size()
public boolean isEmpty()
public boolean containsKey(java.lang.Object key)
public boolean containsValue(java.lang.Object value)
public V get(java.lang.Object key)
public CollectionX<V> values()
public boolean equals(java.lang.Object o)
public int hashCode()
@Deprecated public void replaceAll(java.util.function.BiFunction<? super K,? super V,? extends V> function)
@Deprecated public boolean remove(java.lang.Object key, java.lang.Object value)
@Deprecated public V computeIfAbsent(K key, java.util.function.Function<? super K,? extends V> mappingFunction)
@Deprecated public V computeIfPresent(K key, java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction)
@Deprecated public V compute(K key, java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction)
@Deprecated public V merge(K key, V value, java.util.function.BiFunction<? super V,? super V,? extends V> remappingFunction)
public <X extends java.lang.Throwable> org.reactivestreams.Subscription forEach(long numberOfElements, java.util.function.Consumer<? super org.jooq.lambda.tuple.Tuple2<K,V>> consumer)
ReactiveStreamsTerminalOperations
Subscription next = ReactiveSeq.of(1,2,3,4)
.forEach(2,System.out::println);
System.out.println("First batch processed!");
next.request(2);
System.out.println("Second batch processed!");
//prints
1
2
First batch processed!
3
4
Second batch processed!
forEach
in interface ReactiveStreamsTerminalOperations<org.jooq.lambda.tuple.Tuple2<K,V>>
numberOfElements
- To consume from the Stream at this timeconsumer
- To accept incoming events from the Streampublic <X extends java.lang.Throwable> org.reactivestreams.Subscription forEach(long numberOfElements, java.util.function.Consumer<? super org.jooq.lambda.tuple.Tuple2<K,V>> consumer, java.util.function.Consumer<? super java.lang.Throwable> consumerError)
ReactiveStreamsTerminalOperations
Subscription next = ReactiveSeq.of(()->1,()->2,()->throw new RuntimeException(),()->4)
.map(Supplier::get)
.forEach(2,System.out::println, e->e.printStackTrace());
System.out.println("First batch processed!");
next.request(2);
System.out.println("Second batch processed!");
//prints
1
2
First batch processed!
RuntimeException Stack Trace on System.err
4
Second batch processed!
forEach
in interface ReactiveStreamsTerminalOperations<org.jooq.lambda.tuple.Tuple2<K,V>>
numberOfElements
- To consume from the Stream at this timeconsumer
- To accept incoming elements from the StreamconsumerError
- To accept incoming processing errors from the Streampublic <X extends java.lang.Throwable> org.reactivestreams.Subscription forEach(long numberOfElements, java.util.function.Consumer<? super org.jooq.lambda.tuple.Tuple2<K,V>> consumer, java.util.function.Consumer<? super java.lang.Throwable> consumerError, java.lang.Runnable onComplete)
ReactiveStreamsTerminalOperations
Subscription next = ReactiveSeq.of(()->1,()->2,()->throw new RuntimeException(),()->4)
.map(Supplier::get)
.forEach(2,System.out::println, e->e.printStackTrace(),()->System.out.println("the take!"));
System.out.println("First batch processed!");
next.request(2);
System.out.println("Second batch processed!");
//prints
1
2
First batch processed!
RuntimeException Stack Trace on System.err
4
Second batch processed!
The take!
forEach
in interface ReactiveStreamsTerminalOperations<org.jooq.lambda.tuple.Tuple2<K,V>>
numberOfElements
- To consume from the Stream at this timeconsumer
- To accept incoming elements from the StreamconsumerError
- To accept incoming processing errors from the StreamonComplete
- To run after an onComplete eventpublic <X extends java.lang.Throwable> org.reactivestreams.Subscription forEachSubscribe(java.util.function.Consumer<? super org.jooq.lambda.tuple.Tuple2<K,V>> consumer)
ReactiveStreamsTerminalOperations
Subscription next = Spouts.of(1,2,3,4)
.forEachSubscribe(System.out::println);
next.request(2);
Thread.sleep(500);
System.out.println("First batch processed!");
next.request(2);
System.out.println("Second batch processed!");
//prints
1
2
First batch processed!
3
4
Second batch processed!
forEachSubscribe
in interface ReactiveStreamsTerminalOperations<org.jooq.lambda.tuple.Tuple2<K,V>>
consumer
- To accept incoming events from the Streampublic <X extends java.lang.Throwable> org.reactivestreams.Subscription forEachSubscribe(java.util.function.Consumer<? super org.jooq.lambda.tuple.Tuple2<K,V>> consumer, java.util.function.Consumer<? super java.lang.Throwable> consumerError)
ReactiveStreamsTerminalOperations
Subscription next = ReactiveSeq.of(()->1,()->2,()->throw new RuntimeException(),()->4)
.map(Supplier::get)
.forEachSubscribe(System.out::println, e->e.printStackTrace());
next.request(2);
System.out.println("First batch processed!");
next.request(2);
System.out.println("Second batch processed!");
//prints
1
2
First batch processed!
RuntimeException Stack Trace on System.err
4
Second batch processed!
forEachSubscribe
in interface ReactiveStreamsTerminalOperations<org.jooq.lambda.tuple.Tuple2<K,V>>
consumer
- To accept incoming elements from the StreamconsumerError
- To accept incoming processing errors from the Streampublic <X extends java.lang.Throwable> org.reactivestreams.Subscription forEachSubscribe(java.util.function.Consumer<? super org.jooq.lambda.tuple.Tuple2<K,V>> consumer, java.util.function.Consumer<? super java.lang.Throwable> consumerError, java.lang.Runnable onComplete)
ReactiveStreamsTerminalOperations
Subscription next = ReactiveSeq.of(()->1,()->2,()->throw new RuntimeException(),()->4)
.map(Supplier::get)
.forEachSubscribe(System.out::println, e->e.printStackTrace(),()->System.out.println("the take!"));
next.request(2);
System.out.println("First batch processed!");
next.request(2);
System.out.println("Second batch processed!");
//prints
1
2
First batch processed!
RuntimeException Stack Trace on System.err
4
Second batch processed!
The take!
forEachSubscribe
in interface ReactiveStreamsTerminalOperations<org.jooq.lambda.tuple.Tuple2<K,V>>
consumer
- To accept incoming elements from the StreamconsumerError
- To accept incoming processing errors from the StreamonComplete
- To run after an onComplete eventpublic <X extends java.lang.Throwable> void forEach(java.util.function.Consumer<? super org.jooq.lambda.tuple.Tuple2<K,V>> consumerElement, java.util.function.Consumer<? super java.lang.Throwable> consumerError)
ReactiveStreamsTerminalOperations
Subscription next = ReactiveSeq.of(()->1,()->2,()->throw new RuntimeException(),()->4)
.map(Supplier::get)
.forEach(System.out::println, e->e.printStackTrace());
System.out.println("processed!");
//prints
1
2
RuntimeException Stack Trace on System.err
4
processed!
forEach
in interface ReactiveStreamsTerminalOperations<org.jooq.lambda.tuple.Tuple2<K,V>>
consumerElement
- To accept incoming elements from the StreamconsumerError
- To accept incoming processing errors from the Streampublic <X extends java.lang.Throwable> void forEach(java.util.function.Consumer<? super org.jooq.lambda.tuple.Tuple2<K,V>> consumerElement, java.util.function.Consumer<? super java.lang.Throwable> consumerError, java.lang.Runnable onComplete)
ReactiveStreamsTerminalOperations
Subscription next = ReactiveSeq.of(()->1,()->2,()->throw new RuntimeException(),()->4)
.map(Supplier::get)
.forEachEvents(System.out::println, e->e.printStackTrace(),()->System.out.println("the take!"));
System.out.println("processed!");
//prints
1
2
RuntimeException Stack Trace on System.err
4
processed!
forEach
in interface ReactiveStreamsTerminalOperations<org.jooq.lambda.tuple.Tuple2<K,V>>
consumerElement
- To accept incoming elements from the StreamconsumerError
- To accept incoming processing errors from the StreamonComplete
- To run after an onComplete event