|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.jira.util.Predicates
public class Predicates
Nested Class Summary | |
---|---|
static class |
Predicates.And<T>
|
static class |
Predicates.Composite<T>
|
static class |
Predicates.FalsePredicate<T>
A predicate that always returns false. |
static class |
Predicates.Or<T>
|
static class |
Predicates.TruePredicate<T>
A predicate that always returns true. |
Constructor Summary | |
---|---|
Predicates()
|
Method Summary | ||
---|---|---|
static
|
allOf(Predicate<? super T> left,
Predicate<? super T> right)
Create a composite predicate that evaluates to true when both the passed predicates evaluate to true. |
|
static
|
anyOf(Predicate<? super T> left,
Predicate<? super T> right)
Create a composite predicate that evaluates to true when one the passed predicates evaluate to true. |
|
static
|
equalTo(T check)
A predicate that check that some input equals the passed argument. |
|
static
|
falsePredicate()
Return a predicate that always returns false. |
|
static
|
isInstanceOf(Class<? extends T> clazz)
|
|
static
|
isNull()
A predicate that check that the input is null. |
|
static
|
not(Predicate<? super T> predicate)
Create a predicate that inverts the behaviour of the passed predicate. |
|
static
|
notNull()
A predicate that check that the input is not null. |
|
static
|
truePredicate()
Return a predicate that always returns true. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Predicates()
Method Detail |
---|
public static <T> Predicate<T> truePredicate()
T
- the type of input the predicate will work for.
public static <T> Predicate<T> falsePredicate()
T
- the type of input the predicate will work for.
public static <T> Predicate<T> equalTo(@NotNull T check)
T
- the typecheck
- the element to check equality of, must not be null.
public static <T> Predicate<T> notNull()
T
- the type
public static <T> Predicate<T> isNull()
T
- the type
public static <T> Predicate<T> isInstanceOf(Class<? extends T> clazz)
public static <T> Predicate<T> allOf(Predicate<? super T> left, Predicate<? super T> right)
left
- the first predicate.right
- the second predicate.
public static <T> Predicate<T> anyOf(Predicate<? super T> left, Predicate<? super T> right)
left
- the first predicate.right
- the second predicate.
public static <T> Predicate<T> not(Predicate<? super T> predicate)
T
- the type of the input for the predicate.predicate
- the predicate to negate. Cannot be null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |