public class ClosureTransformer<T> extends java.lang.Object implements Transformer<T,T>, java.io.Serializable
Constructor and Description |
---|
ClosureTransformer(Closure<? super T> closure)
Constructor that performs no validation.
|
Modifier and Type | Method and Description |
---|---|
static <T> Transformer<T,T> |
closureTransformer(Closure<? super T> closure)
Factory method that performs validation.
|
Closure<? super T> |
getClosure()
Gets the closure.
|
T |
transform(T input)
Transforms the input to result by executing a closure.
|
public static <T> Transformer<T,T> closureTransformer(Closure<? super T> closure)
T
- the type of the object to transformclosure
- the closure to call, not nullclosure
transformerjava.lang.NullPointerException
- if the closure is nullpublic T transform(T input)
transform
in interface Transformer<T,T>
input
- the input object to transform"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"