Class NullSafePredicate<T>

java.lang.Object
org.jenkinsci.plugins.github.util.misc.NullSafePredicate<T>
All Implemented Interfaces:
com.google.common.base.Predicate<T>, Predicate<T>

public abstract class NullSafePredicate<T> extends Object implements com.google.common.base.Predicate<T>
This abstract class calls applyNullSafe(Object) only after success validation of inner object for null
Author:
lanwen (Merkushev Kirill)
  • Constructor Details

    • NullSafePredicate

      public NullSafePredicate()
  • Method Details

    • apply

      public boolean apply(T input)
      Specified by:
      apply in interface com.google.common.base.Predicate<T>
    • applyNullSafe

      protected abstract boolean applyNullSafe(@NonNull T input)
      This method will be called inside of apply(Object)