@FunctionalInterface public interface LSupplier<T> extends java.util.function.Supplier<T>, MetaSupplier, MetaInterface.NonThrowing, Codomain<aType.a<T>>, Domain0
Non-throwing functional interface (lambda) LSupplier for Java 8.
Type: supplier
Domain (lvl: 0): none
Co-domain: T
| Modifier and Type | Interface and Description |
|---|---|
static class |
LSupplier.LSupplierSingle<T> |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
static LSupplier<String> |
NULL_VALUE_MESSAGE_SUPPLIER |
| Modifier and Type | Method and Description |
|---|---|
default LSupplier<T> |
after(LConsumer<? super T> after) |
default LSupplier<T> |
before(LAction before) |
static <T> T |
call(LSupplier<T> lambda) |
default <V2> LSupplier<V2> |
cast()
Cast that replace generics.
|
static <V2,T> LSupplier<V2> |
cast(LSupplier<T> function)
Cast that replace generics.
|
static <T> LSupplier<T> |
failSafe(LSupplier<T> func,
LSupplier<T> failSafe) |
default T |
failSafeGet(LSupplier<T> failSafe) |
static <T> T |
failSafeGet(LSupplier<T> func,
LSupplier<T> failSafe) |
static <T> void |
fromTill(int min_i,
int max_i,
LSupplier<T> func)
From-To.
|
static <T> void |
fromTo(int min_i,
int max_i,
LSupplier<T> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default T |
get() |
default T |
get(ExWF<RuntimeException> exF) |
default T |
get(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default T |
getThen(LFunction<Throwable,T> handler) |
T |
getX()
Implement this, but call get()
|
default LSupplier<T> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default T |
handlingGet(HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <T> T |
handlingGet(LSupplier<T> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
default T |
nestingGet()
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default LSupplier<T> |
nonNullable()
Converts to function that makes sure that the result is not null.
|
default T |
nonNullGet()
Function call that ensures the result is not null
|
static <T> LSupplier<T> |
of(T r)
Creates function that always returns the same value.
|
static <T> T |
produce()
Does nothing (LSupplier) Supplier
|
static <T> LSupplier<T> |
recursive(LFunction<LSupplier<T>,LSupplier<T>> selfLambda) |
static <T> LSupplier<T> |
safe()
Safe instance.
|
static <T> LSupplier<T> |
safe(LSupplier<T> other)
Safe wrapping.
|
static <T> LSupplier<LSupplier<T>> |
safeSupplier()
Safe instance supplier.
|
static <T> LSupplier<LSupplier<T>> |
safeSupplier(LSupplier<LSupplier<T>> supplier)
Safe supplier.
|
default T |
shovingGet()
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
static <T> LSupplier<T> |
sup(LSupplier<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
static <T> LSupplier<T> |
supThrowing(ExF<Throwable> exF) |
static <T> LSupplier<T> |
supThrowing(String message,
ExMF<Throwable> exF) |
static <T> void |
times(int max_i,
LSupplier<T> func)
From-To.
|
default LAction |
toAct(LConsumer<? super T> after)
Combines two functions together in a order.
|
default LBoolSupplier |
toBoolSup(LPredicate<? super T> after)
Combines two functions together in a order.
|
default LByteSupplier |
toByteSup(LToByteFunction<? super T> after)
Combines two functions together in a order.
|
default LCharSupplier |
toCharSup(LToCharFunction<? super T> after)
Combines two functions together in a order.
|
default LDblSupplier |
toDblSup(LToDblFunction<? super T> after)
Combines two functions together in a order.
|
default LFltSupplier |
toFltSup(LToFltFunction<? super T> after)
Combines two functions together in a order.
|
default LIntSupplier |
toIntSup(LToIntFunction<? super T> after)
Combines two functions together in a order.
|
default LLongSupplier |
toLongSup(LToLongFunction<? super T> after)
Combines two functions together in a order.
|
default LSrtSupplier |
toSrtSup(LToSrtFunction<? super T> after)
Combines two functions together in a order.
|
default <V> LSupplier<V> |
toSup(LFunction<? super T,? extends V> after)
Combines two functions together in a order.
|
static <T> T |
tryGet(LSupplier<T> func) |
static <T> T |
tryGet(LSupplier<T> func,
ExWF<RuntimeException> exF) |
static <T> T |
tryGet(LSupplier<T> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T> T |
tryGetThen(LSupplier<T> func,
LFunction<Throwable,T> handler) |
default LSupplier<T> |
trying(ExWF<RuntimeException> exF) |
default LSupplier<T> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LSupplier<T> |
tryingThen(LFunction<Throwable,T> handler) |
default T |
tupleGet(LTuple.Void args) |
default LSupplier |
untyped()
Cast that removes generics.
|
static <T> LSupplier<T> |
wrap(java.util.function.Supplier<T> other)
Wraps JRE instance.
|
isSupplierformatTo, isAction, isConsumer, isFunction, isOperator, isPredicateisThrowingstatic final String DESCRIPTION
@Nullable default T get()
get in interface java.util.function.Supplier<T>default T tupleGet(LTuple.Void args)
default T handlingGet(HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LSupplier<T> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default T get(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LSupplier<T> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default T get(@Nonnull ExWF<RuntimeException> exF)
default LSupplier<T> trying(@Nonnull ExWF<RuntimeException> exF)
default T nestingGet()
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default T shovingGet()
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static <T> T handlingGet(LSupplier<T> func, HandlingInstructions<Throwable,RuntimeException> handling)
static <T> T tryGet(LSupplier<T> func)
static <T> T tryGet(LSupplier<T> func, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
static <T> T tryGet(LSupplier<T> func, @Nonnull ExWF<RuntimeException> exF)
@Nonnull default String functionalInterfaceDescription()
Returns description of the functional interface.
functionalInterfaceDescription in interface MetaFunctionalInterfacestatic <T> void fromTo(int min_i,
int max_i,
LSupplier<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void fromTill(int min_i,
int max_i,
LSupplier<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void times(int max_i,
LSupplier<T> func)
From-To. Intended to be used with non-capturing lambda.
default LSupplier untyped()
Cast that removes generics.
default <V2> LSupplier<V2> cast()
Cast that replace generics.
static <T> LSupplier<T> of(T r)
Creates function that always returns the same value.
@Nonnull static <T> LSupplier<T> sup(@Nonnull LSupplier<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
@Nonnull static <T> LSupplier<T> recursive(@Nonnull LFunction<LSupplier<T>,LSupplier<T>> selfLambda)
@Nonnull static <T> LSupplier<T> supThrowing(String message, @Nonnull ExMF<Throwable> exF)
@Nonnull static <T> LSupplier<T> wrap(java.util.function.Supplier<T> other)
Wraps JRE instance.
@Nonnull static <T> LSupplier<T> safe()
Safe instance. That always returns the same value (as produce).
@Nonnull static <T> LSupplier<LSupplier<T>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static <T> LSupplier<T> safe(@Nullable LSupplier<T> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <T> LSupplier<LSupplier<T>> safeSupplier(@Nullable LSupplier<LSupplier<T>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default <V> LSupplier<V> toSup(@Nonnull LFunction<? super T,? extends V> after)
Combines two functions together in a order.
@Nonnull default LAction toAct(@Nonnull LConsumer<? super T> after)
Combines two functions together in a order.
@Nonnull default LByteSupplier toByteSup(@Nonnull LToByteFunction<? super T> after)
Combines two functions together in a order.
@Nonnull default LSrtSupplier toSrtSup(@Nonnull LToSrtFunction<? super T> after)
Combines two functions together in a order.
@Nonnull default LIntSupplier toIntSup(@Nonnull LToIntFunction<? super T> after)
Combines two functions together in a order.
@Nonnull default LLongSupplier toLongSup(@Nonnull LToLongFunction<? super T> after)
Combines two functions together in a order.
@Nonnull default LFltSupplier toFltSup(@Nonnull LToFltFunction<? super T> after)
Combines two functions together in a order.
@Nonnull default LDblSupplier toDblSup(@Nonnull LToDblFunction<? super T> after)
Combines two functions together in a order.
@Nonnull default LCharSupplier toCharSup(@Nonnull LToCharFunction<? super T> after)
Combines two functions together in a order.
@Nonnull default LBoolSupplier toBoolSup(@Nonnull LPredicate<? super T> after)
Combines two functions together in a order.
@Nonnull default LSupplier<T> nonNullable()
Converts to function that makes sure that the result is not null.
static <T> T produce()
Does nothing (LSupplier) Supplier
Copyright © 2019. All rights reserved.