Package com.scytales.mvalid.sdk
Class Functions
-
- All Implemented Interfaces:
public class FunctionsThe type Functions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceFunctions.FailableRunnableThe interface Failable runnable.
public interfaceFunctions.FailableCallableThe interface Failable callable.
public interfaceFunctions.FailableConsumerThe interface Failable consumer.
public interfaceFunctions.FailableBiConsumerThe interface Failable bi consumer.
public interfaceFunctions.FailableFunctionThe interface Failable function.
public interfaceFunctions.FailableBiFunctionThe interface Failable bi function.
public interfaceFunctions.FailablePredicateThe interface Failable predicate.
public interfaceFunctions.FailableBiPredicateThe interface Failable bi predicate.
-
Constructor Summary
Constructors Constructor Description Functions()
-
Method Summary
Modifier and Type Method Description static <T extends Throwable> voidrun(Functions.FailableRunnable<T> pRunnable)Run. static <O, T extends Throwable> Ocall(Functions.FailableCallable<O, T> pCallable)Call o. static <O, T extends Throwable> voidaccept(Functions.FailableConsumer<O, T> pConsumer, O pObject)Accept. static <O1, O2, T extends Throwable> voidaccept(Functions.FailableBiConsumer<O1, O2, T> pConsumer, O1 pObject1, O2 pObject2)Accept. static <I, O, T extends Throwable> Oapply(Functions.FailableFunction<I, O, T> pFunction, I pInput)Apply o. static <I1, I2, O, T extends Throwable> Oapply(Functions.FailableBiFunction<I1, I2, O, T> pFunction, I1 pInput1, I2 pInput2)Apply o. static <O, T extends Throwable> booleantest(Functions.FailablePredicate<O, T> pPredicate, O pObject)Test boolean. static <O1, O2, T extends Throwable> booleantest(Functions.FailableBiPredicate<O1, O2, T> pPredicate, O1 pObject1, O2 pObject2)Test boolean. static voidtryWithResources(Functions.FailableRunnable<out Throwable> pAction, Functions.FailableConsumer<Throwable, out Throwable> pErrorHandler, Array<Functions.FailableRunnable<out Throwable>> pResources)Try with resources. static voidtryWithResources(Functions.FailableRunnable<out Throwable> pAction, Array<Functions.FailableRunnable<out Throwable>> pResources)Try with resources. static RuntimeExceptionrethrow(Throwable pThrowable)Rethrow runtime exception. -
-
Method Detail
-
run
static <T extends Throwable> void run(Functions.FailableRunnable<T> pRunnable)
Run.
- Parameters:
pRunnable- the p runnable
-
call
static <O, T extends Throwable> O call(Functions.FailableCallable<O, T> pCallable)
Call o.
- Parameters:
pCallable- the p callable
-
accept
static <O, T extends Throwable> void accept(Functions.FailableConsumer<O, T> pConsumer, O pObject)
Accept.
- Parameters:
pConsumer- the p consumerpObject- the p object
-
accept
static <O1, O2, T extends Throwable> void accept(Functions.FailableBiConsumer<O1, O2, T> pConsumer, O1 pObject1, O2 pObject2)
Accept.
- Parameters:
pConsumer- the p consumerpObject1- the p object 1pObject2- the p object 2
-
apply
static <I, O, T extends Throwable> O apply(Functions.FailableFunction<I, O, T> pFunction, I pInput)
Apply o.
- Parameters:
pFunction- the p functionpInput- the p input
-
apply
static <I1, I2, O, T extends Throwable> O apply(Functions.FailableBiFunction<I1, I2, O, T> pFunction, I1 pInput1, I2 pInput2)
Apply o.
- Parameters:
pFunction- the p functionpInput1- the p input 1pInput2- the p input 2
-
test
static <O, T extends Throwable> boolean test(Functions.FailablePredicate<O, T> pPredicate, O pObject)
Test boolean.
- Parameters:
pPredicate- the p predicatepObject- the p object
-
test
static <O1, O2, T extends Throwable> boolean test(Functions.FailableBiPredicate<O1, O2, T> pPredicate, O1 pObject1, O2 pObject2)
Test boolean.
- Parameters:
pPredicate- the p predicatepObject1- the p object 1pObject2- the p object 2
-
tryWithResources
@SafeVarargs() static void tryWithResources(Functions.FailableRunnable<out Throwable> pAction, Functions.FailableConsumer<Throwable, out Throwable> pErrorHandler, Array<Functions.FailableRunnable<out Throwable>> pResources)
Try with resources.
- Parameters:
pAction- the p actionpErrorHandler- the p error handlerpResources- the p resources
-
tryWithResources
@SafeVarargs() static void tryWithResources(Functions.FailableRunnable<out Throwable> pAction, Array<Functions.FailableRunnable<out Throwable>> pResources)
Try with resources.
- Parameters:
pAction- the p actionpResources- the p resources
-
rethrow
static RuntimeException rethrow(Throwable pThrowable)
Rethrow runtime exception.
- Parameters:
pThrowable- the p throwable
-
-
-
-