Package org.ametys.core.util
Class LambdaUtils
- java.lang.Object
-
- org.ametys.core.util.LambdaUtils
-
public final class LambdaUtils extends Object
Helper for lambda expressions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LambdaUtils.BiPredicate<T,U>
Some usefulbiPredicates
static class
LambdaUtils.Collectors
Some usefulcollectors
static class
LambdaUtils.LambdaException
Runtime exception wrapping the exception thrown from the lambdastatic interface
LambdaUtils.ThrowingConsumer<T>
Consumer allowed to throw checkedException
.static interface
LambdaUtils.ThrowingFunction<T,R>
Function allowed to throw checkedException
.static interface
LambdaUtils.ThrowingPredicate<T>
Predicate allowed to throw checkedException
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T,R>
Function<T,R>wrap(LambdaUtils.ThrowingFunction<T,R> function)
static <T> Consumer<T>
wrapConsumer(LambdaUtils.ThrowingConsumer<T> consumer)
static <T> Predicate<T>
wrapPredicate(LambdaUtils.ThrowingPredicate<T> predicate)
-
-
-
Method Detail
-
wrap
public static <T,R> Function<T,R> wrap(LambdaUtils.ThrowingFunction<T,R> function)
-
wrapPredicate
public static <T> Predicate<T> wrapPredicate(LambdaUtils.ThrowingPredicate<T> predicate)
-
wrapConsumer
public static <T> Consumer<T> wrapConsumer(LambdaUtils.ThrowingConsumer<T> consumer)
-
-