/** * Factory method that performs validation. * * @param closure the closure to call, not null * @return the <code>closure</code> transformer * @throws IllegalArgumentException if the closure is null */ public static Transformer getInstance(Closure closure) { if (closure == null) { throw new IllegalArgumentException("Closure must not be null"); } return new ClosureTransformer(closure); }
/** * Creates a Transformer that calls a Closure each time the transformer is used. * The transformer returns the input object. * * @see org.apache.commons.collections.functors.ClosureTransformer * * @param closure the closure to run each time in the transformer, not null * @return the transformer * @throws IllegalArgumentException if the closure is null */ public static Transformer asTransformer(Closure closure) { return ClosureTransformer.getInstance(closure); }
/** * Creates a Transformer that calls a Closure each time the transformer is used. * The transformer returns the input object. * * @see org.apache.commons.collections.functors.ClosureTransformer * * @param closure the closure to run each time in the transformer, not null * @return the transformer * @throws IllegalArgumentException if the closure is null */ public static Transformer asTransformer(Closure closure) { return ClosureTransformer.getInstance(closure); }
/** * Factory method that performs validation. * * @param closure the closure to call, not null * @return the <code>closure</code> transformer * @throws IllegalArgumentException if the closure is null */ public static Transformer getInstance(Closure closure) { if (closure == null) { throw new IllegalArgumentException("Closure must not be null"); } return new ClosureTransformer(closure); }
/** * Creates a Transformer that calls a Closure each time the transformer is used. * The transformer returns the input object. * * @see org.apache.commons.collections.functors.ClosureTransformer * * @param closure the closure to run each time in the transformer, not null * @return the transformer * @throws IllegalArgumentException if the closure is null */ public static Transformer asTransformer(Closure closure) { return ClosureTransformer.getInstance(closure); }
/** * Factory method that performs validation. * * @param closure the closure to call, not null * @return the <code>closure</code> transformer * @throws IllegalArgumentException if the closure is null */ public static Transformer getInstance(Closure closure) { if (closure == null) { throw new IllegalArgumentException("Closure must not be null"); } return new ClosureTransformer(closure); }
/** * Creates a Transformer that calls a Closure each time the transformer is used. * The transformer returns the input object. * * @see org.apache.commons.collections.functors.ClosureTransformer * * @param closure the closure to run each time in the transformer, not null * @return the transformer * @throws IllegalArgumentException if the closure is null */ public static Transformer asTransformer(Closure closure) { return ClosureTransformer.getInstance(closure); }
/** * Factory method that performs validation. * * @param closure the closure to call, not null * @return the <code>closure</code> transformer * @throws IllegalArgumentException if the closure is null */ public static Transformer getInstance(Closure closure) { if (closure == null) { throw new IllegalArgumentException("Closure must not be null"); } return new ClosureTransformer(closure); }
/** * Creates a Transformer that calls a Closure each time the transformer is used. * The transformer returns the input object. * * @see org.apache.commons.collections.functors.ClosureTransformer * * @param closure the closure to run each time in the transformer, not null * @return the transformer * @throws IllegalArgumentException if the closure is null */ public static Transformer asTransformer(Closure closure) { return ClosureTransformer.getInstance(closure); }
/** * Factory method that performs validation. * * @param closure the closure to call, not null * @return the <code>closure</code> transformer * @throws IllegalArgumentException if the closure is null */ public static Transformer getInstance(Closure closure) { if (closure == null) { throw new IllegalArgumentException("Closure must not be null"); } return new ClosureTransformer(closure); }
/** * Creates a Transformer that calls a Closure each time the transformer is used. * The transformer returns the input object. * * @see org.apache.commons.collections.functors.ClosureTransformer * * @param closure the closure to run each time in the transformer, not null * @return the transformer * @throws IllegalArgumentException if the closure is null */ public static Transformer asTransformer(Closure closure) { return ClosureTransformer.getInstance(closure); }
/** * Factory method that performs validation. * * @param closure the closure to call, not null * @return the <code>closure</code> transformer * @throws IllegalArgumentException if the closure is null */ public static Transformer getInstance(Closure closure) { if (closure == null) { throw new IllegalArgumentException("Closure must not be null"); } return new ClosureTransformer(closure); }
/** * Creates a Transformer that calls a Closure each time the transformer is used. * The transformer returns the input object. * * @see org.apache.commons.collections.functors.ClosureTransformer * * @param closure the closure to run each time in the transformer, not null * @return the transformer * @throws IllegalArgumentException if the closure is null */ public static Transformer asTransformer(Closure closure) { return ClosureTransformer.getInstance(closure); }
/** * Factory method that performs validation. * * @param closure the closure to call, not null * @return the <code>closure</code> transformer * @throws IllegalArgumentException if the closure is null */ public static Transformer getInstance(Closure closure) { if (closure == null) { throw new IllegalArgumentException("Closure must not be null"); } return new ClosureTransformer(closure); }