/** * Creates a Transformer that calls a Factory each time the transformer is used. * The transformer will return the value returned by the factory. * * @see org.apache.commons.collections.functors.FactoryTransformer * * @param factory the factory to run each time in the transformer, not null * @return the transformer * @throws IllegalArgumentException if the factory is null */ public static Transformer asTransformer(Factory factory) { return FactoryTransformer.getInstance(factory); }
/** * Creates a Transformer that calls a Factory each time the transformer is used. * The transformer will return the value returned by the factory. * * @see org.apache.commons.collections.functors.FactoryTransformer * * @param factory the factory to run each time in the transformer, not null * @return the transformer * @throws IllegalArgumentException if the factory is null */ public static Transformer asTransformer(Factory factory) { return FactoryTransformer.getInstance(factory); }
/** * Constructor that wraps (not copies). * * @param map the map to decorate, must not be null * @param factory the factory to use, must not be null * @throws IllegalArgumentException if map or factory is null */ protected LazyMap(Map map, Factory factory) { super(map); if (factory == null) { throw new IllegalArgumentException("Factory must not be null"); } this.factory = FactoryTransformer.getInstance(factory); }
/** * Constructor that wraps (not copies). * * @param map the map to decorate, must not be null * @param factory the factory to use, must not be null * @throws IllegalArgumentException if map or factory is null */ protected LazyMap(Map map, Factory factory) { super(map); if (factory == null) { throw new IllegalArgumentException("Factory must not be null"); } this.factory = FactoryTransformer.getInstance(factory); }
/** * Factory method to create a defaulting map. * <p> * The factory specified is called when a missing key is found. * The result will be returned as the result of the map get(key) method. * * @param map the map to decorate, must not be null * @param factory the factory to use, must not be null * @throws IllegalArgumentException if map or factory is null */ public static Map decorate(Map map, Factory factory) { if (factory == null) { throw new IllegalArgumentException("Factory must not be null"); } return new DefaultedMap(map, FactoryTransformer.getInstance(factory)); }
/** * Factory method to create a defaulting map. * <p> * The factory specified is called when a missing key is found. * The result will be returned as the result of the map get(key) method. * * @param map the map to decorate, must not be null * @param factory the factory to use, must not be null * @throws IllegalArgumentException if map or factory is null */ public static Map decorate(Map map, Factory factory) { if (factory == null) { throw new IllegalArgumentException("Factory must not be null"); } return new DefaultedMap(map, FactoryTransformer.getInstance(factory)); }
/** * Creates a Transformer that calls a Factory each time the transformer is used. * The transformer will return the value returned by the factory. * * @see org.apache.commons.collections.functors.FactoryTransformer * * @param factory the factory to run each time in the transformer, not null * @return the transformer * @throws IllegalArgumentException if the factory is null */ public static Transformer asTransformer(Factory factory) { return FactoryTransformer.getInstance(factory); }
/** * Creates a Transformer that calls a Factory each time the transformer is used. * The transformer will return the value returned by the factory. * * @see org.apache.commons.collections.functors.FactoryTransformer * * @param factory the factory to run each time in the transformer, not null * @return the transformer * @throws IllegalArgumentException if the factory is null */ public static Transformer asTransformer(Factory factory) { return FactoryTransformer.getInstance(factory); }
/** * Creates a Transformer that calls a Factory each time the transformer is used. * The transformer will return the value returned by the factory. * * @see org.apache.commons.collections.functors.FactoryTransformer * * @param factory the factory to run each time in the transformer, not null * @return the transformer * @throws IllegalArgumentException if the factory is null */ public static Transformer asTransformer(Factory factory) { return FactoryTransformer.getInstance(factory); }
/** * Creates a Transformer that calls a Factory each time the transformer is used. * The transformer will return the value returned by the factory. * * @see org.apache.commons.collections.functors.FactoryTransformer * * @param factory the factory to run each time in the transformer, not null * @return the transformer * @throws IllegalArgumentException if the factory is null */ public static Transformer asTransformer(Factory factory) { return FactoryTransformer.getInstance(factory); }
/** * Creates a Transformer that calls a Factory each time the transformer is used. * The transformer will return the value returned by the factory. * * @see org.apache.commons.collections.functors.FactoryTransformer * * @param factory the factory to run each time in the transformer, not null * @return the transformer * @throws IllegalArgumentException if the factory is null */ public static Transformer asTransformer(Factory factory) { return FactoryTransformer.getInstance(factory); }
/** * Constructor that wraps (not copies). * * @param map the map to decorate, must not be null * @param factory the factory to use, must not be null * @throws IllegalArgumentException if map or factory is null */ protected LazyMap(Map map, Factory factory) { super(map); if (factory == null) { throw new IllegalArgumentException("Factory must not be null"); } this.factory = FactoryTransformer.getInstance(factory); }
/** * Constructor that wraps (not copies). * * @param map the map to decorate, must not be null * @param factory the factory to use, must not be null * @throws IllegalArgumentException if map or factory is null */ protected LazyMap(Map map, Factory factory) { super(map); if (factory == null) { throw new IllegalArgumentException("Factory must not be null"); } this.factory = FactoryTransformer.getInstance(factory); }
/** * Constructor that wraps (not copies). * * @param map the map to decorate, must not be null * @param factory the factory to use, must not be null * @throws IllegalArgumentException if map or factory is null */ protected LazyMap(Map map, Factory factory) { super(map); if (factory == null) { throw new IllegalArgumentException("Factory must not be null"); } this.factory = FactoryTransformer.getInstance(factory); }
/** * Constructor that wraps (not copies). * * @param map the map to decorate, must not be null * @param factory the factory to use, must not be null * @throws IllegalArgumentException if map or factory is null */ protected LazyMap(Map map, Factory factory) { super(map); if (factory == null) { throw new IllegalArgumentException("Factory must not be null"); } this.factory = FactoryTransformer.getInstance(factory); }
/** * Constructor that wraps (not copies). * * @param map the map to decorate, must not be null * @param factory the factory to use, must not be null * @throws IllegalArgumentException if map or factory is null */ protected LazyMap(Map map, Factory factory) { super(map); if (factory == null) { throw new IllegalArgumentException("Factory must not be null"); } this.factory = FactoryTransformer.getInstance(factory); }
/** * Factory method to create a defaulting map. * <p> * The factory specified is called when a missing key is found. * The result will be returned as the result of the map get(key) method. * * @param map the map to decorate, must not be null * @param factory the factory to use, must not be null * @throws IllegalArgumentException if map or factory is null */ public static Map decorate(Map map, Factory factory) { if (factory == null) { throw new IllegalArgumentException("Factory must not be null"); } return new DefaultedMap(map, FactoryTransformer.getInstance(factory)); }
/** * Factory method to create a defaulting map. * <p> * The factory specified is called when a missing key is found. * The result will be returned as the result of the map get(key) method. * * @param map the map to decorate, must not be null * @param factory the factory to use, must not be null * @throws IllegalArgumentException if map or factory is null */ public static Map decorate(Map map, Factory factory) { if (factory == null) { throw new IllegalArgumentException("Factory must not be null"); } return new DefaultedMap(map, FactoryTransformer.getInstance(factory)); }
/** * Factory method to create a defaulting map. * <p> * The factory specified is called when a missing key is found. * The result will be returned as the result of the map get(key) method. * * @param map the map to decorate, must not be null * @param factory the factory to use, must not be null * @throws IllegalArgumentException if map or factory is null */ public static Map decorate(Map map, Factory factory) { if (factory == null) { throw new IllegalArgumentException("Factory must not be null"); } return new DefaultedMap(map, FactoryTransformer.getInstance(factory)); }
/** * Factory method to create a defaulting map. * <p> * The factory specified is called when a missing key is found. * The result will be returned as the result of the map get(key) method. * * @param map the map to decorate, must not be null * @param factory the factory to use, must not be null * @throws IllegalArgumentException if map or factory is null */ public static Map decorate(Map map, Factory factory) { if (factory == null) { throw new IllegalArgumentException("Factory must not be null"); } return new DefaultedMap(map, FactoryTransformer.getInstance(factory)); }