/** * Factory to create the predicate. * * @param predicates the predicates to check, cloned, not null * @return the <code>one</code> predicate * @throws IllegalArgumentException if the predicates array is null * @throws IllegalArgumentException if any predicate in the array is null */ public static Predicate getInstance(Collection predicates) { Predicate[] preds = FunctorUtils.validate(predicates); return new OnePredicate(preds); }
/** * Factory to create the predicate. * * @param predicates the predicates to check, cloned, not null * @return the <code>one</code> predicate * @throws IllegalArgumentException if the predicates array is null * @throws IllegalArgumentException if any predicate in the array is null */ public static Predicate getInstance(Collection predicates) { Predicate[] preds = FunctorUtils.validate(predicates); return new OnePredicate(preds); }
/** * Factory to create the predicate. * <p> * If the array is size zero, the predicate always returns false. * If the array is size one, then that predicate is returned. * * @param predicates the predicates to check, cloned, not null * @return the <code>any</code> predicate * @throws IllegalArgumentException if the predicates array is null * @throws IllegalArgumentException if any predicate in the array is null */ public static Predicate getInstance(Predicate[] predicates) { FunctorUtils.validate(predicates); if (predicates.length == 0) { return FalsePredicate.INSTANCE; } if (predicates.length == 1) { return predicates[0]; } predicates = FunctorUtils.copy(predicates); return new OnePredicate(predicates); }
/** * Factory to create the predicate. * <p> * If the array is size zero, the predicate always returns false. * If the array is size one, then that predicate is returned. * * @param predicates the predicates to check, cloned, not null * @return the <code>any</code> predicate * @throws IllegalArgumentException if the predicates array is null * @throws IllegalArgumentException if any predicate in the array is null */ public static Predicate getInstance(Predicate[] predicates) { FunctorUtils.validate(predicates); if (predicates.length == 0) { return FalsePredicate.INSTANCE; } if (predicates.length == 1) { return predicates[0]; } predicates = FunctorUtils.copy(predicates); return new OnePredicate(predicates); }
/** * Factory to create the predicate. * * @param predicates the predicates to check, cloned, not null * @return the <code>one</code> predicate * @throws IllegalArgumentException if the predicates array is null * @throws IllegalArgumentException if any predicate in the array is null */ public static Predicate getInstance(Collection predicates) { Predicate[] preds = FunctorUtils.validate(predicates); return new OnePredicate(preds); }
/** * Factory to create the predicate. * * @param predicates the predicates to check, cloned, not null * @return the <code>one</code> predicate * @throws IllegalArgumentException if the predicates array is null * @throws IllegalArgumentException if any predicate in the array is null */ public static Predicate getInstance(Collection predicates) { Predicate[] preds = FunctorUtils.validate(predicates); return new OnePredicate(preds); }
/** * Factory to create the predicate. * * @param predicates the predicates to check, cloned, not null * @return the <code>one</code> predicate * @throws IllegalArgumentException if the predicates array is null * @throws IllegalArgumentException if any predicate in the array is null */ public static Predicate getInstance(Collection predicates) { Predicate[] preds = FunctorUtils.validate(predicates); return new OnePredicate(preds); }
/** * Factory to create the predicate. * * @param predicates the predicates to check, cloned, not null * @return the <code>one</code> predicate * @throws IllegalArgumentException if the predicates array is null * @throws IllegalArgumentException if any predicate in the array is null */ public static Predicate getInstance(Collection predicates) { Predicate[] preds = FunctorUtils.validate(predicates); return new OnePredicate(preds); }
/** * Factory to create the predicate. * * @param predicates the predicates to check, cloned, not null * @return the <code>one</code> predicate * @throws IllegalArgumentException if the predicates array is null * @throws IllegalArgumentException if any predicate in the array is null */ public static Predicate getInstance(Collection predicates) { Predicate[] preds = FunctorUtils.validate(predicates); return new OnePredicate(preds); }
/** * Factory to create the predicate. * <p> * If the array is size zero, the predicate always returns false. * If the array is size one, then that predicate is returned. * * @param predicates the predicates to check, cloned, not null * @return the <code>any</code> predicate * @throws IllegalArgumentException if the predicates array is null * @throws IllegalArgumentException if any predicate in the array is null */ public static Predicate getInstance(Predicate[] predicates) { FunctorUtils.validate(predicates); if (predicates.length == 0) { return FalsePredicate.INSTANCE; } if (predicates.length == 1) { return predicates[0]; } predicates = FunctorUtils.copy(predicates); return new OnePredicate(predicates); }
/** * Factory to create the predicate. * <p> * If the array is size zero, the predicate always returns false. * If the array is size one, then that predicate is returned. * * @param predicates the predicates to check, cloned, not null * @return the <code>any</code> predicate * @throws IllegalArgumentException if the predicates array is null * @throws IllegalArgumentException if any predicate in the array is null */ public static Predicate getInstance(Predicate[] predicates) { FunctorUtils.validate(predicates); if (predicates.length == 0) { return FalsePredicate.INSTANCE; } if (predicates.length == 1) { return predicates[0]; } predicates = FunctorUtils.copy(predicates); return new OnePredicate(predicates); }
/** * Factory to create the predicate. * <p> * If the array is size zero, the predicate always returns false. * If the array is size one, then that predicate is returned. * * @param predicates the predicates to check, cloned, not null * @return the <code>any</code> predicate * @throws IllegalArgumentException if the predicates array is null * @throws IllegalArgumentException if any predicate in the array is null */ public static Predicate getInstance(Predicate[] predicates) { FunctorUtils.validate(predicates); if (predicates.length == 0) { return FalsePredicate.INSTANCE; } if (predicates.length == 1) { return predicates[0]; } predicates = FunctorUtils.copy(predicates); return new OnePredicate(predicates); }
/** * Factory to create the predicate. * <p> * If the array is size zero, the predicate always returns false. * If the array is size one, then that predicate is returned. * * @param predicates the predicates to check, cloned, not null * @return the <code>any</code> predicate * @throws IllegalArgumentException if the predicates array is null * @throws IllegalArgumentException if any predicate in the array is null */ public static Predicate getInstance(Predicate[] predicates) { FunctorUtils.validate(predicates); if (predicates.length == 0) { return FalsePredicate.INSTANCE; } if (predicates.length == 1) { return predicates[0]; } predicates = FunctorUtils.copy(predicates); return new OnePredicate(predicates); }
/** * Factory to create the predicate. * <p> * If the array is size zero, the predicate always returns false. * If the array is size one, then that predicate is returned. * * @param predicates the predicates to check, cloned, not null * @return the <code>any</code> predicate * @throws IllegalArgumentException if the predicates array is null * @throws IllegalArgumentException if any predicate in the array is null */ public static Predicate getInstance(Predicate[] predicates) { FunctorUtils.validate(predicates); if (predicates.length == 0) { return FalsePredicate.INSTANCE; } if (predicates.length == 1) { return predicates[0]; } predicates = FunctorUtils.copy(predicates); return new OnePredicate(predicates); }