java.lang.Object
io.smallrye.mutiny.groups.UniOnNull<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncontinueWith(Supplier<? extends T> supplier) Provides a default item if the currentUnifiresnullas item.continueWith(T fallback) Provides a default item if the currentUnifiresnullas item.fail()LikefailWith(Throwable)but using aNoSuchElementException.
-
Constructor Details
-
UniOnNull
-
-
Method Details
-
failWith
-
failWith
If the currentUnifiresnullas item, the producedUniemits a failure produced using the givenSupplier.- Parameters:
supplier- the supplier to produce the failure, must not benull, must not producenull- Returns:
- the new
Uni
-
fail
LikefailWith(Throwable)but using aNoSuchElementException.- Returns:
- the new
Uni
-
switchTo
If the currentUnifiresnullas item, the producedUniemits the events produced by theUnipassed as parameter.- Parameters:
other- the unit to switch to, must not benull- Returns:
- the new
Uni
-
switchTo
If the currentUnifiresnullas item, the producedUniemits the events produced by anUnisupplied using the passedSupplier- Parameters:
supplier- the supplier to use to produce the uni, must not benull, must not returnnulls- Returns:
- the new
Uni
-
continueWith
Provides a default item if the currentUnifiresnullas item.- Parameters:
fallback- the default item, must not benull- Returns:
- the new
Uni
-
continueWith
Provides a default item if the currentUnifiresnullas item. The new item is supplied by the givenSupplier.- Parameters:
supplier- the supplier to produce the new item, must not benull, must not producenull- Returns:
- the new
Uni
-