/** * Factory method to create a predicated (validating) collection. * <p> * If there are any elements already in the collection being decorated, they * are validated. * * @param coll the collection to decorate, must not be null * @param predicate the predicate to use for validation, must not be null * @return a new predicated collection * @throws IllegalArgumentException if collection or predicate is null * @throws IllegalArgumentException if the collection contains invalid elements */ public static Collection decorate(Collection coll, Predicate predicate) { return new PredicatedCollection(coll, predicate); }
/** * Factory method to create a predicated (validating) collection. * <p> * If there are any elements already in the collection being decorated, they * are validated. * * @param coll the collection to decorate, must not be null * @param predicate the predicate to use for validation, must not be null * @return a new predicated collection * @throws IllegalArgumentException if collection or predicate is null * @throws IllegalArgumentException if the collection contains invalid elements */ public static Collection decorate(Collection coll, Predicate predicate) { return new PredicatedCollection(coll, predicate); }
/** * Factory method to create a typed collection. * <p> * If there are any elements already in the collection being decorated, they * are validated. * * @param coll the collection to decorate, must not be null * @param type the type to allow into the collection, must not be null * @return a new typed collection * @throws IllegalArgumentException if collection or type is null * @throws IllegalArgumentException if the collection contains invalid elements */ public static Collection decorate(Collection coll, Class type) { return new PredicatedCollection(coll, InstanceofPredicate.getInstance(type)); }
/** * Factory method to create a typed collection. * <p> * If there are any elements already in the collection being decorated, they * are validated. * * @param coll the collection to decorate, must not be null * @param type the type to allow into the collection, must not be null * @return a new typed collection * @throws IllegalArgumentException if collection or type is null * @throws IllegalArgumentException if the collection contains invalid elements */ public static Collection decorate(Collection coll, Class type) { return new PredicatedCollection(coll, InstanceofPredicate.getInstance(type)); }
/** * Factory method to create a predicated (validating) collection. * <p> * If there are any elements already in the collection being decorated, they * are validated. * * @param coll the collection to decorate, must not be null * @param predicate the predicate to use for validation, must not be null * @return a new predicated collection * @throws IllegalArgumentException if collection or predicate is null * @throws IllegalArgumentException if the collection contains invalid elements */ public static Collection decorate(Collection coll, Predicate predicate) { return new PredicatedCollection(coll, predicate); }
/** * Factory method to create a predicated (validating) collection. * <p> * If there are any elements already in the collection being decorated, they * are validated. * * @param coll the collection to decorate, must not be null * @param predicate the predicate to use for validation, must not be null * @return a new predicated collection * @throws IllegalArgumentException if collection or predicate is null * @throws IllegalArgumentException if the collection contains invalid elements */ public static Collection decorate(Collection coll, Predicate predicate) { return new PredicatedCollection(coll, predicate); }
/** * Factory method to create a predicated (validating) collection. * <p> * If there are any elements already in the collection being decorated, they * are validated. * * @param coll the collection to decorate, must not be null * @param predicate the predicate to use for validation, must not be null * @return a new predicated collection * @throws IllegalArgumentException if collection or predicate is null * @throws IllegalArgumentException if the collection contains invalid elements */ public static Collection decorate(Collection coll, Predicate predicate) { return new PredicatedCollection(coll, predicate); }
/** * Factory method to create a predicated (validating) collection. * <p> * If there are any elements already in the collection being decorated, they * are validated. * * @param coll the collection to decorate, must not be null * @param predicate the predicate to use for validation, must not be null * @return a new predicated collection * @throws IllegalArgumentException if collection or predicate is null * @throws IllegalArgumentException if the collection contains invalid elements */ public static Collection decorate(Collection coll, Predicate predicate) { return new PredicatedCollection(coll, predicate); }
/** * Factory method to create a predicated (validating) collection. * <p> * If there are any elements already in the collection being decorated, they * are validated. * * @param coll the collection to decorate, must not be null * @param predicate the predicate to use for validation, must not be null * @return a new predicated collection * @throws IllegalArgumentException if collection or predicate is null * @throws IllegalArgumentException if the collection contains invalid elements */ public static Collection decorate(Collection coll, Predicate predicate) { return new PredicatedCollection(coll, predicate); }
/** * Factory method to create a typed collection. * <p> * If there are any elements already in the collection being decorated, they * are validated. * * @param coll the collection to decorate, must not be null * @param type the type to allow into the collection, must not be null * @return a new typed collection * @throws IllegalArgumentException if collection or type is null * @throws IllegalArgumentException if the collection contains invalid elements */ public static Collection decorate(Collection coll, Class type) { return new PredicatedCollection(coll, InstanceofPredicate.getInstance(type)); }
/** * Factory method to create a typed collection. * <p> * If there are any elements already in the collection being decorated, they * are validated. * * @param coll the collection to decorate, must not be null * @param type the type to allow into the collection, must not be null * @return a new typed collection * @throws IllegalArgumentException if collection or type is null * @throws IllegalArgumentException if the collection contains invalid elements */ public static Collection decorate(Collection coll, Class type) { return new PredicatedCollection(coll, InstanceofPredicate.getInstance(type)); }
/** * Factory method to create a typed collection. * <p> * If there are any elements already in the collection being decorated, they * are validated. * * @param coll the collection to decorate, must not be null * @param type the type to allow into the collection, must not be null * @return a new typed collection * @throws IllegalArgumentException if collection or type is null * @throws IllegalArgumentException if the collection contains invalid elements */ public static Collection decorate(Collection coll, Class type) { return new PredicatedCollection(coll, InstanceofPredicate.getInstance(type)); }
/** * Factory method to create a typed collection. * <p> * If there are any elements already in the collection being decorated, they * are validated. * * @param coll the collection to decorate, must not be null * @param type the type to allow into the collection, must not be null * @return a new typed collection * @throws IllegalArgumentException if collection or type is null * @throws IllegalArgumentException if the collection contains invalid elements */ public static Collection decorate(Collection coll, Class type) { return new PredicatedCollection(coll, InstanceofPredicate.getInstance(type)); }
/** * Factory method to create a typed collection. * <p> * If there are any elements already in the collection being decorated, they * are validated. * * @param coll the collection to decorate, must not be null * @param type the type to allow into the collection, must not be null * @return a new typed collection * @throws IllegalArgumentException if collection or type is null * @throws IllegalArgumentException if the collection contains invalid elements */ public static Collection decorate(Collection coll, Class type) { return new PredicatedCollection(coll, InstanceofPredicate.getInstance(type)); }