| Modifier and Type | Method and Description |
|---|---|
static <T> Predicate<T> |
alwaysFalse()
Creates a predicate that is always
false. |
static <T> Predicate<T> |
alwaysTrue()
Creates a predicate that is always
true. |
static <T> Predicate<T> |
constant(boolean value)
Creates a predicate that returns a constant value.
|
static <T,U> Predicate<U> |
curryFirst(BiPredicate<T,U> predicate,
T t)
Curries the first parameter of the
BiPredicate and creates a Predicate. |
static <T,U> Predicate<T> |
currySecond(BiPredicate<T,U> predicate,
U u)
Curries the second parameter of the
BiPredicate and creates a Predicate. |
static <T,U extends T> |
instanceOf(Class<? extends U> clazz)
Creates a
Predicate that checks if it's input is an instance of clazz. |
static <T> Predicate<T> |
not(Predicate<T> predicate)
Negates the predicate.
|
static <T> Predicate<T> |
of(Predicate<T> predicate)
Creates a predicate.
|
public static <T> Predicate<T> not(Predicate<T> predicate)
T - the type of the input to the predicatepredicate - the predicate to negatepublic static <T> Predicate<T> of(Predicate<T> predicate)
T - the type of the input to the predicatepredicate - the predicatepublic static <T> Predicate<T> alwaysFalse()
false.T - the type of the input to the predicatepublic static <T> Predicate<T> alwaysTrue()
true.T - the type of the input to the predicatepublic static <T> Predicate<T> constant(boolean value)
T - the type of the input to the predicatevalue - the constant valuepublic static <T,U extends T> Predicate<T> instanceOf(@Nonnull Class<? extends U> clazz)
Predicate that checks if it's input is an instance of clazz.T - The input type.U - The type of which the input has to be an instance of.clazz - The class of which the input has to be an instance of.public static <T,U> Predicate<U> curryFirst(@Nonnull BiPredicate<T,U> predicate, T t)
BiPredicate and creates a Predicate.T - the first parameter typeU - the second parameter typepredicate - the predicatet - the curried parameterpublic static <T,U> Predicate<T> currySecond(@Nonnull BiPredicate<T,U> predicate, U u)
BiPredicate and creates a Predicate.T - the first parameter typeU - the second parameter typepredicate - the predicateu - the curried parameterCopyright © 2015–2021 52North Initiative for Geospatial Open Source Software GmbH. All rights reserved.