Class Predicates

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

@Deprecated public class Predicates extends Object
Deprecated.
use Guava predicates and functions
  • Constructor Details

    • Predicates

      public Predicates()
      Deprecated.
  • Method Details

    • 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(@Nonnull 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.