com.atlassian.jira.util
Class Predicates

java.lang.Object
  extended by com.atlassian.jira.util.Predicates

Deprecated. use Guava predicates and functions

@Deprecated
public class Predicates
extends Object


Nested Class Summary
static class Predicates.And<T>
          Deprecated.  
static class Predicates.Composite<T>
          Deprecated.  
static class Predicates.FalsePredicate<T>
          Deprecated. A predicate that always returns false.
static class Predicates.Or<T>
          Deprecated.  
static class Predicates.TruePredicate<T>
          Deprecated. A predicate that always returns true.
 
Constructor Summary
Predicates()
          Deprecated.  
 
Method Summary
static
<T> Predicate<T>
allOf(Predicate<? super T> left, Predicate<? super T> right)
          Deprecated. Create a composite predicate that evaluates to true when both the passed predicates evaluate to true.
static
<T> Predicate<T>
anyOf(Predicate<? super T> left, Predicate<? super T> right)
          Deprecated. Create a composite predicate that evaluates to true when one the passed predicates evaluate to true.
static
<T> Predicate<T>
equalTo(T check)
          Deprecated. A predicate that check that some input equals the passed argument.
static
<T> Predicate<T>
falsePredicate()
          Deprecated. Return a predicate that always returns false.
static
<T> Predicate<T>
isInstanceOf(Class<? extends T> clazz)
          Deprecated.  
static
<T> Predicate<T>
isNull()
          Deprecated. A predicate that check that the input is null.
static
<T> Predicate<T>
not(Predicate<? super T> predicate)
          Deprecated. Create a predicate that inverts the behaviour of the passed predicate.
static
<T> Predicate<T>
notNull()
          Deprecated. A predicate that check that the input is not null.
static
<T> Predicate<T>
truePredicate()
          Deprecated. 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

Predicates

public Predicates()
Deprecated. 
Method Detail

truePredicate

public static <T> Predicate<T> truePredicate()
Deprecated. 
Return a predicate that always returns true.

Type Parameters:
T - the type of input the predicate will work for.
Returns:
a predicate that always returns true.

falsePredicate

public static <T> Predicate<T> falsePredicate()
Deprecated. 
Return a predicate that always returns false.

Type Parameters:
T - the type of input the predicate will work for.
Returns:
a predicate that always returns false.

equalTo

public static <T> Predicate<T> equalTo(@NotNull
                                       T check)
Deprecated. 
A predicate that check that some input equals the passed argument.

Type Parameters:
T - the type
Parameters:
check - the element to check equality of, must not be null.
Returns:
a Predicate that will return true if the input matches the argument.

notNull

public static <T> Predicate<T> notNull()
Deprecated. 
A predicate that check that the input is not null.

Type Parameters:
T - the type
Returns:
a Predicate that will return true if the input is not null.

isNull

public static <T> Predicate<T> isNull()
Deprecated. 
A predicate that check that the input is null.

Type Parameters:
T - the type
Returns:
a Predicate that will return true if the input is null.

isInstanceOf

public static <T> Predicate<T> isInstanceOf(Class<? extends T> clazz)
Deprecated. 

allOf

public static <T> Predicate<T> allOf(Predicate<? super T> left,
                                     Predicate<? super T> right)
Deprecated. 
Create a composite predicate that evaluates to true when both the passed predicates evaluate to true.

Parameters:
left - the first predicate.
right - the second predicate.
Returns:
a composite predicate that is only true when both the passed predicates evaluate to true.

anyOf

public static <T> Predicate<T> anyOf(Predicate<? super T> left,
                                     Predicate<? super T> right)
Deprecated. 
Create a composite predicate that evaluates to true when one the passed predicates evaluate to true.

Parameters:
left - the first predicate.
right - the second predicate.
Returns:
a composite predicate that is only true when both the passed predicates evaluate to true.

not

public static <T> Predicate<T> not(Predicate<? super T> predicate)
Deprecated. 
Create a predicate that inverts the behaviour of the passed predicate.

Type Parameters:
T - the type of the input for the predicate.
Parameters:
predicate - the predicate to negate. Cannot be null.
Returns:
a predicate that inverts the behaviour of the passed predicate.


Copyright © 2002-2012 Atlassian. All Rights Reserved.