| Package | Description |
|---|---|
| no.digipost | |
| no.digipost.collection | |
| no.digipost.concurrent |
| Modifier and Type | Method and Description |
|---|---|
static <T> AdaptableCollector<T,OneTimeAssignment<T>,Optional<T>> |
DiggCollectors.allowAtMostOne()
This is a collector for accessing the expected singular only element of a
Stream, as
it will throw an exception if more than one element is processed. |
static <T> AdaptableCollector<T,OneTimeAssignment<T>,Optional<T>> |
DiggCollectors.allowAtMostOneOrElseThrow(BiFunction<? super T,? super T,? extends RuntimeException> exceptionOnExcessiveElements)
This is a collector for accessing the expected singular only element of a
Stream, as
it will throw the exception yielded from the given function if more than one element is processed. |
| Modifier and Type | Method and Description |
|---|---|
BiConsumer<OneTimeAssignment<T>,T> |
EnforceAtMostOneElementCollector.accumulator() |
BinaryOperator<OneTimeAssignment<T>> |
EnforceAtMostOneElementCollector.combiner() |
Function<OneTimeAssignment<T>,Optional<T>> |
EnforceAtMostOneElementCollector.finisher() |
Supplier<OneTimeAssignment<T>> |
EnforceAtMostOneElementCollector.supplier() |
| Modifier and Type | Method and Description |
|---|---|
static <V> OneTimeAssignment<V> |
OneTimeAssignment.defaultTo(Supplier<? extends V> defaultValue)
Create a new non-assigned instance with a default value.
|
static <V> OneTimeAssignment<V> |
OneTimeAssignment.defaultTo(V defaultValue)
Create a new non-assigned instance with a default value.
|
static <V> OneTimeAssignment<V> |
OneTimeAssignment.newInstance()
Create a new non-assigned instance.
|
Copyright © 2016 Digipost. All rights reserved.