Exclude a type from being randomized.

@param predicate to identify the type to exclude
@return the current {@link EasyRandomParameters} instance for method chaining

@see FieldPredicates
513082
public EasyRandomParameters excludeType(Predicate<Class<?>> predicate) {
        Objects.requireNonNull(predicate, "Predicate must not be null");
        typeExclusionPredicates.add(predicate);
        exclusionRandomizerRegistry.addTypePredicate(predicate);
        return this;
    }
718829
public static <T> Predicate<T> not(final Predicate<? super T> p) {
    return new Predicate<T>() {
      @Override
      public boolean apply(T obj) {
        return !p.apply(obj);
      }
    };
  }
111529
public static <T> Optional<T> getNullableAndFilteredOptional(T target,
            Predicate<T> predicate) {
        return Optional.ofNullable(target).filter(predicate);
    }
1301661
@NotNull
    public OptionalLong filterNot(@NotNull LongPredicate predicate) {
        return filter(LongPredicate.Util.negate(predicate));
    }
1143716
static <R> BiPredicate<R, Throwable> resultPredicateFor(Predicate<R> resultPredicate) {
    return (t, u) -> {
      if (u == null) {
        return resultPredicate.test(t);
      } else {
        // resultPredicate is only defined over the success type.
        // It doesn't know how to handle a failure of type Throwable,
        // so we return false here.
        return false;
      }
    };
  }
189704
def any(self, predicate):
        
        if predicate is None:
            raise NullArgumentError(
                u"predicate lambda expression is necessary")
        return self.where(predicate).count() > 0
610474
public static <T extends Executable> Predicate<T> executableHasSameParameterTypesAs(T reference) {
        return candidate -> {
            if (candidate == null) {
                return false;
            }
            Class<?>[] candidateParameterTypes = candidate.getParameterTypes();
            Class<?>[] referenceParameterTypes = reference.getParameterTypes();
            if (candidateParameterTypes.length != referenceParameterTypes.length) {
                return false;
            }
            for (int i = 0; i < candidateParameterTypes.length; i++) {
                if (!candidateParameterTypes[i].equals(referenceParameterTypes[i])) {
                    return false;
                }
            }
            return true;
        };
    }
539146
public RetryerBuilder<V> retryIfException(@Nonnull Predicate<Throwable> exceptionPredicate) {
        Preconditions.checkNotNull(exceptionPredicate, "exceptionPredicate may not be null");
        rejectionPredicate = Predicates.or(rejectionPredicate, new ExceptionPredicate<V>(exceptionPredicate));
        return this;
    }
965893
public static <T, E extends Exception> Predicate<T> sneaked(SneakyPredicate<T, E> predicate) {
    return t -> {
      @SuppressWarnings("unchecked")
      SneakyPredicate<T, RuntimeException> castedSneakyPredicate =
          (SneakyPredicate<T, RuntimeException>) predicate;
      return castedSneakyPredicate.test(t);
    };
  }
42840
public static <T, U, E extends Exception> BiPredicate<T, U> sneaked(
      SneakyBiPredicate<T, U, E> biPredicate) {
    return (t, u) -> {
      @SuppressWarnings("unchecked")
      SneakyBiPredicate<T, U, RuntimeException> castedBiPredicate =
          (SneakyBiPredicate<T, U, RuntimeException>) biPredicate;
      return castedBiPredicate.test(t, u);
    };
  }
501176
public static <T, E extends Throwable> @NonNull Predicate<T> unwrappingRethrowPredicate(final @NonNull ThrowingPredicate<T, E> predicate) {
    return input -> {
      try {
        return predicate.throwingTest(input);
      } catch(final Throwable t) {
        throw rethrow(unwrap(t));
      }
    };
  }
1116805
public static <T> Collector<T, ?, Optional<T>> onlyOne(final Predicate<? super T> predicate) {
        final Collector<T, ?, Optional<T>> downstream = onlyOne();

        return filtering(predicate, downstream);
    }
847922
@NotNull
    public Optional<T> filter(@NotNull Predicate<? super T> predicate) {
        if (!isPresent()) return this;
        return predicate.test(value) ? this : Optional.<T>empty();
    }
773629
public static <T> Predicate<T> always() {
        return new Predicate<T>() {
            @Override
            public boolean test( T input ) {
                return true;
            }
        };
    }
811113
public T filter(@NonNull SerializablePredicate<? super HString> filter) {
      this.filter = filter;
      return Cast.as(this);
   }
244933
public static <T> List<T> filter( Iterable<T> collection, Predicate<T> predicate)
    {
        List<T> filtered = new ArrayList<T>();
        for (T element : collection)
        {
        	if (predicate.isVerifiedBy(element))
        	{
        		filtered.add(element);
        	}
        }
        return filtered;
    }
903470
public FirewallPolicyFilter where(Predicate<FirewallPolicyMetadata> predicate) {
        checkNotNull(predicate, "Predicate must be not a null");

        this.predicate = this.predicate.and(predicate);

        return this;
    }