Package com.scytales.mvalid.sdk
Class Functions
-
- All Implemented Interfaces:
public class Functions
The type Functions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
Functions.FailableRunnable
The interface Failable runnable.
public interface
Functions.FailableCallable
The interface Failable callable.
public interface
Functions.FailableConsumer
The interface Failable consumer.
public interface
Functions.FailableBiConsumer
The interface Failable bi consumer.
public interface
Functions.FailableFunction
The interface Failable function.
public interface
Functions.FailableBiFunction
The interface Failable bi function.
public interface
Functions.FailablePredicate
The interface Failable predicate.
public interface
Functions.FailableBiPredicate
The interface Failable bi predicate.
-
Constructor Summary
Constructors Constructor Description Functions()
-
Method Summary
Modifier and Type Method Description static <T extends Throwable> void
run(Functions.FailableRunnable<T> pRunnable)
Run. static <O, T extends Throwable> O
call(Functions.FailableCallable<O, T> pCallable)
Call o. static <O, T extends Throwable> void
accept(Functions.FailableConsumer<O, T> pConsumer, O pObject)
Accept. static <O1, O2, T extends Throwable> void
accept(Functions.FailableBiConsumer<O1, O2, T> pConsumer, O1 pObject1, O2 pObject2)
Accept. static <I, O, T extends Throwable> O
apply(Functions.FailableFunction<I, O, T> pFunction, I pInput)
Apply o. static <I1, I2, O, T extends Throwable> O
apply(Functions.FailableBiFunction<I1, I2, O, T> pFunction, I1 pInput1, I2 pInput2)
Apply o. static <O, T extends Throwable> boolean
test(Functions.FailablePredicate<O, T> pPredicate, O pObject)
Test boolean. static <O1, O2, T extends Throwable> boolean
test(Functions.FailableBiPredicate<O1, O2, T> pPredicate, O1 pObject1, O2 pObject2)
Test boolean. static void
tryWithResources(Functions.FailableRunnable<out Throwable> pAction, Functions.FailableConsumer<Throwable, out Throwable> pErrorHandler, Array<Functions.FailableRunnable<out Throwable>> pResources)
Try with resources. static void
tryWithResources(Functions.FailableRunnable<out Throwable> pAction, Array<Functions.FailableRunnable<out Throwable>> pResources)
Try with resources. static RuntimeException
rethrow(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
-
-
-
-