Package io.microsphere.lang.function
Interface Predicates
-
public interface Predicates
The utilities class for JavaPredicate
- Since:
- 1.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.function.Predicate[]
EMPTY_PREDICATE_ARRAY
-
Method Summary
Static Methods Modifier and Type Method Description static <T> java.util.function.Predicate<T>
alwaysFalse()
Predicate
always returnfalse
static <T> java.util.function.Predicate<T>
alwaysTrue()
Predicate
always returntrue
static <T> java.util.function.Predicate<? super T>
and(java.util.function.Predicate<? super T>... predicates)
a composed predicate that represents a short-circuiting logical AND ofpredicates
static <T> java.util.function.Predicate<T>[]
emptyArray()
static <T> java.util.function.Predicate<? super T>
or(java.util.function.Predicate<? super T>... predicates)
a composed predicate that represents a short-circuiting logical OR ofpredicates
-
-
-
Method Detail
-
emptyArray
static <T> java.util.function.Predicate<T>[] emptyArray()
-
alwaysTrue
static <T> java.util.function.Predicate<T> alwaysTrue()
Predicate
always returntrue
- Type Parameters:
T
- the type to test- Returns:
true
-
alwaysFalse
static <T> java.util.function.Predicate<T> alwaysFalse()
Predicate
always returnfalse
- Type Parameters:
T
- the type to test- Returns:
false
-
and
static <T> java.util.function.Predicate<? super T> and(java.util.function.Predicate<? super T>... predicates)
a composed predicate that represents a short-circuiting logical AND ofpredicates
- Type Parameters:
T
- the type to test- Parameters:
predicates
-predicates
- Returns:
- non-null
-
or
static <T> java.util.function.Predicate<? super T> or(java.util.function.Predicate<? super T>... predicates)
a composed predicate that represents a short-circuiting logical OR ofpredicates
- Type Parameters:
T
- the detected type- Parameters:
predicates
-predicates
- Returns:
- non-null
-
-