@FunctionalInterface public interface LToByteFunction<T> extends MetaFunction, MetaInterface.NonThrowing, OFunction<T,aType.aByte>, Codomain<aType.aByte>, Domain1<aType.a<T>>
Non-throwing functional interface (lambda) LToByteFunction for Java 8.
Type: function
Domain (lvl: 1): T a
Co-domain: byte
Special case of function that corresponds to expressions like (iterator) -> Iterator::next
| Modifier and Type | Interface and Description |
|---|---|
static class |
LToByteFunction.LToByteFunctionSingle<T> |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
default byte |
applyAsByte(T a) |
default byte |
applyAsByte(T a,
ExWF<RuntimeException> exF) |
default byte |
applyAsByte(T a,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default byte |
applyAsByteThen(T a,
LToByteFunction<Throwable> handler) |
byte |
applyAsByteX(T a)
Implement this, but call applyAsByte(T a)
|
static <T> byte |
call(T a,
LToByteFunction<T> lambda) |
default LByteSupplier |
capture(T a)
Captures arguments but delays the evaluation.
|
default <V2> LToByteFunction<V2> |
cast()
Cast that replace generics.
|
static <V2,T> LToByteFunction<V2> |
cast(LToByteFunction<T> function)
Cast that replace generics.
|
default <V> LToByteFunction<V> |
compose(LFunction<? super V,? extends T> before)
Allows to manipulate the domain of the function.
|
static <V,T> LToByteFunction<V> |
composed(LFunction<? super V,? extends T> before,
LToByteFunction<T> after) |
static <T> LToByteFunction<T> |
constant(byte r)
Creates function that always returns the same value.
|
static <T> LToByteFunction<T> |
failSafe(LToByteFunction<T> func,
LToByteFunction<T> failSafe) |
default byte |
failSafeApplyAsByte(T a,
LToByteFunction<T> failSafe) |
static <T> byte |
failSafeApplyAsByte(T a,
LToByteFunction<T> func,
LToByteFunction<T> failSafe) |
default <C0> void |
forEach(IndexedRead<C0,aType.a<T>> ia,
C0 source,
LByteConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
static <T> void |
fromTill(int min_i,
int max_i,
T a,
LToByteFunction<T> func)
From-To.
|
static <T> void |
fromTo(int min_i,
int max_i,
T a,
LToByteFunction<T> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LToByteFunction<T> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default byte |
handlingApplyAsByte(T a,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <T> byte |
handlingApplyAsByte(T a,
LToByteFunction<T> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
default <C0,I0> void |
iterate(SequentialRead<C0,I0,aType.a<T>> sa,
C0 source,
LByteConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default byte |
nestingApplyAsByte(T a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default byte |
nonNullApplyAsByte(T a)
Just to mirror the method: Ensures the result is not null
|
static <T> byte |
produceByte(T a)
Does nothing (LToByteFunction) Function
|
static <T> LToByteFunction<T> |
recursive(LFunction<LToByteFunction<T>,LToByteFunction<T>> selfLambda) |
static <T> LToByteFunction<T> |
safe()
Safe instance.
|
static <T> LToByteFunction<T> |
safe(LToByteFunction<T> other)
Safe wrapping.
|
static <T> LSupplier<LToByteFunction<T>> |
safeSupplier()
Safe instance supplier.
|
static <T> LSupplier<LToByteFunction<T>> |
safeSupplier(LSupplier<LToByteFunction<T>> supplier)
Safe supplier.
|
default byte |
shovingApplyAsByte(T a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
default <V> LFunction<T,V> |
then(LByteFunction<? extends V> after)
Combines two functions together in a order.
|
default LPredicate<T> |
thenToBool(LBytePredicate after)
Combines two functions together in a order.
|
default LToByteFunction<T> |
thenToByte(LByteUnaryOperator after)
Combines two functions together in a order.
|
default LToCharFunction<T> |
thenToChar(LByteToCharFunction after)
Combines two functions together in a order.
|
default LToDblFunction<T> |
thenToDbl(LByteToDblFunction after)
Combines two functions together in a order.
|
default LToFltFunction<T> |
thenToFlt(LByteToFltFunction after)
Combines two functions together in a order.
|
default LToIntFunction<T> |
thenToInt(LByteToIntFunction after)
Combines two functions together in a order.
|
default LToLongFunction<T> |
thenToLong(LByteToLongFunction after)
Combines two functions together in a order.
|
default LToSrtFunction<T> |
thenToSrt(LByteToSrtFunction after)
Combines two functions together in a order.
|
static <T> void |
times(int max_i,
T a,
LToByteFunction<T> func)
From-To.
|
static <T> LToByteFunction<T> |
toByteFunc(LToByteFunction<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
static <T> LToByteFunction<T> |
toByteFuncThrowing(ExF<Throwable> exF) |
static <T> LToByteFunction<T> |
toByteFuncThrowing(String message,
ExMF<Throwable> exF) |
static <T> byte |
tryApplyAsByte(T a,
LToByteFunction<T> func) |
static <T> byte |
tryApplyAsByte(T a,
LToByteFunction<T> func,
ExWF<RuntimeException> exF) |
static <T> byte |
tryApplyAsByte(T a,
LToByteFunction<T> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T> byte |
tryApplyAsByteThen(T a,
LToByteFunction<T> func,
LToByteFunction<Throwable> handler) |
default LToByteFunction<T> |
trying(ExWF<RuntimeException> exF) |
default LToByteFunction<T> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LToByteFunction<T> |
tryingThen(LToByteFunction<Throwable> handler) |
default byte |
tupleApplyAsByte(LSingle<T> args) |
default LToByteFunction |
untyped()
Cast that removes generics.
|
isThrowingisFunctionformatTo, isAction, isConsumer, isOperator, isPredicate, isSupplierstatic final String DESCRIPTION
default byte applyAsByte(T a)
byte applyAsByteX(T a) throws Throwable
Implement this, but call applyAsByte(T a)
Throwabledefault byte handlingApplyAsByte(T a, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LToByteFunction<T> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default byte applyAsByte(T a, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LToByteFunction<T> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default byte applyAsByte(T a, @Nonnull ExWF<RuntimeException> exF)
default LToByteFunction<T> trying(@Nonnull ExWF<RuntimeException> exF)
default byte applyAsByteThen(T a, @Nonnull LToByteFunction<Throwable> handler)
default LToByteFunction<T> tryingThen(@Nonnull LToByteFunction<Throwable> handler)
default byte nestingApplyAsByte(T a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default byte shovingApplyAsByte(T a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static <T> byte handlingApplyAsByte(T a,
LToByteFunction<T> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <T> byte tryApplyAsByte(T a,
LToByteFunction<T> func)
static <T> byte tryApplyAsByte(T a,
LToByteFunction<T> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <T> byte tryApplyAsByte(T a,
LToByteFunction<T> func,
@Nonnull
ExWF<RuntimeException> exF)
static <T> byte tryApplyAsByteThen(T a,
LToByteFunction<T> func,
@Nonnull
LToByteFunction<Throwable> handler)
default byte failSafeApplyAsByte(T a, @Nonnull LToByteFunction<T> failSafe)
static <T> byte failSafeApplyAsByte(T a,
LToByteFunction<T> func,
@Nonnull
LToByteFunction<T> failSafe)
static <T> LToByteFunction<T> failSafe(LToByteFunction<T> func, @Nonnull LToByteFunction<T> failSafe)
default byte nonNullApplyAsByte(T a)
Just to mirror the method: Ensures the result is not null
@Nonnull default String functionalInterfaceDescription()
Returns description of the functional interface.
functionalInterfaceDescription in interface MetaFunctionalInterfacestatic <T> void fromTo(int min_i,
int max_i,
T a,
LToByteFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void fromTill(int min_i,
int max_i,
T a,
LToByteFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void times(int max_i,
T a,
LToByteFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
default LToByteFunction untyped()
Cast that removes generics.
default <V2> LToByteFunction<V2> cast()
Cast that replace generics.
static <V2,T> LToByteFunction<V2> cast(LToByteFunction<T> function)
Cast that replace generics.
default LByteSupplier capture(T a)
Captures arguments but delays the evaluation.
static <T> LToByteFunction<T> constant(byte r)
Creates function that always returns the same value.
@Nonnull static <T> LToByteFunction<T> toByteFunc(@Nonnull LToByteFunction<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> LToByteFunction<T> recursive(@Nonnull LFunction<LToByteFunction<T>,LToByteFunction<T>> selfLambda)
@Nonnull static <T> LToByteFunction<T> toByteFuncThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static <T> LToByteFunction<T> toByteFuncThrowing(String message, @Nonnull ExMF<Throwable> exF)
static <T> byte call(T a,
@Nonnull
LToByteFunction<T> lambda)
@Nonnull static <T> LToByteFunction<T> safe()
Safe instance. That always returns the same value (as produceByte).
@Nonnull static <T> LSupplier<LToByteFunction<T>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static <T> LToByteFunction<T> safe(@Nullable LToByteFunction<T> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <T> LSupplier<LToByteFunction<T>> safeSupplier(@Nullable LSupplier<LToByteFunction<T>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default <V> LToByteFunction<V> compose(@Nonnull LFunction<? super V,? extends T> before)
Allows to manipulate the domain of the function.
static <V,T> LToByteFunction<V> composed(@Nonnull LFunction<? super V,? extends T> before, LToByteFunction<T> after)
@Nonnull default <V> LFunction<T,V> then(@Nonnull LByteFunction<? extends V> after)
Combines two functions together in a order.
@Nonnull default LToByteFunction<T> thenToByte(@Nonnull LByteUnaryOperator after)
Combines two functions together in a order.
@Nonnull default LToSrtFunction<T> thenToSrt(@Nonnull LByteToSrtFunction after)
Combines two functions together in a order.
@Nonnull default LToIntFunction<T> thenToInt(@Nonnull LByteToIntFunction after)
Combines two functions together in a order.
@Nonnull default LToLongFunction<T> thenToLong(@Nonnull LByteToLongFunction after)
Combines two functions together in a order.
@Nonnull default LToFltFunction<T> thenToFlt(@Nonnull LByteToFltFunction after)
Combines two functions together in a order.
@Nonnull default LToDblFunction<T> thenToDbl(@Nonnull LByteToDblFunction after)
Combines two functions together in a order.
@Nonnull default LToCharFunction<T> thenToChar(@Nonnull LByteToCharFunction after)
Combines two functions together in a order.
@Nonnull default LPredicate<T> thenToBool(@Nonnull LBytePredicate after)
Combines two functions together in a order.
static <T> byte produceByte(T a)
Does nothing (LToByteFunction) Function
default <C0> void forEach(IndexedRead<C0,aType.a<T>> ia, C0 source, LByteConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer. Thread safety, fail-fast, fail-safety of this method is not expected.
default <C0,I0> void iterate(SequentialRead<C0,I0,aType.a<T>> sa, C0 source, LByteConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer. Thread safety, fail-fast, fail-safety of this method depends highly on the arguments.
Copyright © 2019. All rights reserved.