public class CloneTransformer<T> extends java.lang.Object implements Transformer<T,T>, java.io.Serializable
Clone is performed using PrototypeFactory.prototypeFactory(input).create()
.
Modifier and Type | Field and Description |
---|---|
static Transformer |
INSTANCE
Singleton predicate instance
|
private static long |
serialVersionUID
Serial version UID
|
Modifier | Constructor and Description |
---|---|
private |
CloneTransformer()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static <T> Transformer<T,T> |
cloneTransformer()
Factory returning the singleton instance.
|
private java.lang.Object |
readResolve() |
T |
transform(T input)
Transforms the input to result by cloning it.
|
private static final long serialVersionUID
public static final Transformer INSTANCE
public static <T> Transformer<T,T> cloneTransformer()
T
- the type of the objects to be clonedpublic T transform(T input)
transform
in interface Transformer<T,T>
input
- the input object to transformprivate java.lang.Object readResolve()