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