|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.collections15.functors.transformer.ClosureTransformer<E>
public class ClosureTransformer<E>
Transformer
implementation that invokes a Closure
using
the input object, before returning the input object.
Constructor Summary | |
---|---|
protected |
ClosureTransformer(Closure<? super E> closure)
Creates a new instance whose transform method executes the specified Closure on an input object, before returning the input
object as output. |
Method Summary | ||
---|---|---|
static
|
getInstance(Closure<? super T> closure)
Returns an instance whose transform method executes the specified Closure on an input object, before returning the input
object as the output. |
|
E |
transform(E input)
Transforms the input by executing the Closure on the input,
and then returning is as output. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ClosureTransformer(Closure<? super E> closure)
Closure
on an input object, before returning the input
object as output.
closure
- The Closure
to execute on input objects.
java.lang.IllegalArgumentException
- Thrown if closure
is
null
.Method Detail |
---|
public static <T> ClosureTransformer<T> getInstance(Closure<? super T> closure)
Closure
on an input object, before returning the input
object as the output.
closure
- The Closure
to execute on input objects.
Closure
on an input object, before returning the
input object as the output.
java.lang.IllegalArgumentException
- Thrown if closure
is
null
.public E transform(E input)
Closure
on the input,
and then returning is as output.
transform
in interface Transformer<E,E>
input
- The input object to transform.
Closure
has been
executed on it.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |