/** * Factory method to create a predicated (validating) map. * <p> * If there are any elements already in the list being decorated, they * are validated. * * @param map the map to decorate, must not be null * @param keyPredicate the predicate to validate the keys, null means no check * @param valuePredicate the predicate to validate to values, null means no check * @throws IllegalArgumentException if the map is null */ public static Map decorate(Map map, Predicate keyPredicate, Predicate valuePredicate) { return new PredicatedMap(map, keyPredicate, valuePredicate); }
/** * Factory method to create a predicated (validating) map. * <p> * If there are any elements already in the list being decorated, they * are validated. * * @param map the map to decorate, must not be null * @param keyPredicate the predicate to validate the keys, null means no check * @param valuePredicate the predicate to validate to values, null means no check * @throws IllegalArgumentException if the map is null */ public static Map decorate(Map map, Predicate keyPredicate, Predicate valuePredicate) { return new PredicatedMap(map, keyPredicate, valuePredicate); }
/** * Factory method to create a typed map. * <p> * If there are any elements already in the map being decorated, they * are validated. * * @param map the map to decorate, must not be null * @param keyType the type to allow as keys, must not be null * @param valueType the type to allow as values, must not be null * @throws IllegalArgumentException if list or type is null * @throws IllegalArgumentException if the list contains invalid elements */ public static Map decorate(Map map, Class keyType, Class valueType) { return new PredicatedMap( map, InstanceofPredicate.getInstance(keyType), InstanceofPredicate.getInstance(valueType) ); }
/** * Factory method to create a typed map. * <p> * If there are any elements already in the map being decorated, they * are validated. * * @param map the map to decorate, must not be null * @param keyType the type to allow as keys, must not be null * @param valueType the type to allow as values, must not be null * @throws IllegalArgumentException if list or type is null * @throws IllegalArgumentException if the list contains invalid elements */ public static Map decorate(Map map, Class keyType, Class valueType) { return new PredicatedMap( map, InstanceofPredicate.getInstance(keyType), InstanceofPredicate.getInstance(valueType) ); }
/** * Factory method to create a predicated (validating) map. * <p> * If there are any elements already in the list being decorated, they * are validated. * * @param map the map to decorate, must not be null * @param keyPredicate the predicate to validate the keys, null means no check * @param valuePredicate the predicate to validate to values, null means no check * @throws IllegalArgumentException if the map is null */ public static Map decorate(Map map, Predicate keyPredicate, Predicate valuePredicate) { return new PredicatedMap(map, keyPredicate, valuePredicate); }
/** * Factory method to create a predicated (validating) map. * <p> * If there are any elements already in the list being decorated, they * are validated. * * @param map the map to decorate, must not be null * @param keyPredicate the predicate to validate the keys, null means no check * @param valuePredicate the predicate to validate to values, null means no check * @throws IllegalArgumentException if the map is null */ public static Map decorate(Map map, Predicate keyPredicate, Predicate valuePredicate) { return new PredicatedMap(map, keyPredicate, valuePredicate); }
/** * Factory method to create a predicated (validating) map. * <p> * If there are any elements already in the list being decorated, they * are validated. * * @param map the map to decorate, must not be null * @param keyPredicate the predicate to validate the keys, null means no check * @param valuePredicate the predicate to validate to values, null means no check * @throws IllegalArgumentException if the map is null */ public static Map decorate(Map map, Predicate keyPredicate, Predicate valuePredicate) { return new PredicatedMap(map, keyPredicate, valuePredicate); }
/** * Factory method to create a predicated (validating) map. * <p> * If there are any elements already in the list being decorated, they * are validated. * * @param map the map to decorate, must not be null * @param keyPredicate the predicate to validate the keys, null means no check * @param valuePredicate the predicate to validate to values, null means no check * @throws IllegalArgumentException if the map is null */ public static Map decorate(Map map, Predicate keyPredicate, Predicate valuePredicate) { return new PredicatedMap(map, keyPredicate, valuePredicate); }
/** * Factory method to create a predicated (validating) map. * <p> * If there are any elements already in the list being decorated, they * are validated. * * @param map the map to decorate, must not be null * @param keyPredicate the predicate to validate the keys, null means no check * @param valuePredicate the predicate to validate to values, null means no check * @throws IllegalArgumentException if the map is null */ public static Map decorate(Map map, Predicate keyPredicate, Predicate valuePredicate) { return new PredicatedMap(map, keyPredicate, valuePredicate); }
/** * Factory method to create a typed map. * <p> * If there are any elements already in the map being decorated, they * are validated. * * @param map the map to decorate, must not be null * @param keyType the type to allow as keys, must not be null * @param valueType the type to allow as values, must not be null * @throws IllegalArgumentException if list or type is null * @throws IllegalArgumentException if the list contains invalid elements */ public static Map decorate(Map map, Class keyType, Class valueType) { return new PredicatedMap( map, InstanceofPredicate.getInstance(keyType), InstanceofPredicate.getInstance(valueType) ); }
/** * Factory method to create a typed map. * <p> * If there are any elements already in the map being decorated, they * are validated. * * @param map the map to decorate, must not be null * @param keyType the type to allow as keys, must not be null * @param valueType the type to allow as values, must not be null * @throws IllegalArgumentException if list or type is null * @throws IllegalArgumentException if the list contains invalid elements */ public static Map decorate(Map map, Class keyType, Class valueType) { return new PredicatedMap( map, InstanceofPredicate.getInstance(keyType), InstanceofPredicate.getInstance(valueType) ); }
/** * Factory method to create a typed map. * <p> * If there are any elements already in the map being decorated, they * are validated. * * @param map the map to decorate, must not be null * @param keyType the type to allow as keys, must not be null * @param valueType the type to allow as values, must not be null * @throws IllegalArgumentException if list or type is null * @throws IllegalArgumentException if the list contains invalid elements */ public static Map decorate(Map map, Class keyType, Class valueType) { return new PredicatedMap( map, InstanceofPredicate.getInstance(keyType), InstanceofPredicate.getInstance(valueType) ); }
/** * Factory method to create a typed map. * <p> * If there are any elements already in the map being decorated, they * are validated. * * @param map the map to decorate, must not be null * @param keyType the type to allow as keys, must not be null * @param valueType the type to allow as values, must not be null * @throws IllegalArgumentException if list or type is null * @throws IllegalArgumentException if the list contains invalid elements */ public static Map decorate(Map map, Class keyType, Class valueType) { return new PredicatedMap( map, InstanceofPredicate.getInstance(keyType), InstanceofPredicate.getInstance(valueType) ); }
/** * Factory method to create a typed map. * <p> * If there are any elements already in the map being decorated, they * are validated. * * @param map the map to decorate, must not be null * @param keyType the type to allow as keys, must not be null * @param valueType the type to allow as values, must not be null * @throws IllegalArgumentException if list or type is null * @throws IllegalArgumentException if the list contains invalid elements */ public static Map decorate(Map map, Class keyType, Class valueType) { return new PredicatedMap( map, InstanceofPredicate.getInstance(keyType), InstanceofPredicate.getInstance(valueType) ); }