code: public static <T> Predicate<T> equalTo(final T obj) {
      return new Predicate<T>() {
        @Override
        public boolean apply(T o) {
          return Objects.equal(o, obj);
        }
      };
    }
docs: Returns a predicate that evaluates to {@code true} if its
  argument is equal to {@code obj}.