Package software.amazon.smithy.utils
Class FunctionalUtils
- java.lang.Object
-
- software.amazon.smithy.utils.FunctionalUtils
-
public final class FunctionalUtils extends java.lang.Object
Utilities for working with functions, predicates, etc.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> java.util.function.Predicate<T>
alwaysTrue()
Returns aPredicate
that always returns true.static <T> java.util.function.Predicate<T>
not(java.util.function.Predicate<T> predicate)
Negates aPredicate
.
-
-
-
Method Detail
-
not
public static <T> java.util.function.Predicate<T> not(java.util.function.Predicate<T> predicate)
Negates aPredicate
.- Type Parameters:
T
- Value type of the predicate.- Parameters:
predicate
- Predicate to negate.- Returns:
- Returns a predicate that negates the given predicate.
-
alwaysTrue
public static <T> java.util.function.Predicate<T> alwaysTrue()
Returns aPredicate
that always returns true.- Type Parameters:
T
- Value that the predicate accepts.- Returns:
- Returns the predicate.
-
-