java.io.Serializable
, Transformer<I,O>
public class FactoryTransformer<I,O> extends java.lang.Object implements Transformer<I,O>, java.io.Serializable
Constructor | Description |
---|---|
FactoryTransformer(Factory<? extends O> factory) |
Constructor that performs no validation.
|
Modifier and Type | Method | Description |
---|---|---|
static <I,O> Transformer<I,O> |
factoryTransformer(Factory<? extends O> factory) |
Factory method that performs validation.
|
Factory<? extends O> |
getFactory() |
Gets the factory.
|
O |
transform(I input) |
Transforms the input by ignoring the input and returning the result of
calling the decorated factory.
|
public static <I,O> Transformer<I,O> factoryTransformer(Factory<? extends O> factory)
I
- the input typeO
- the output typefactory
- the factory to call, not nullfactory
transformerjava.lang.NullPointerException
- if the factory is nullpublic O transform(I input)
transform
in interface Transformer<I,O>
input
- the input object to transformCopyright © 2001-2019 - Apache Software Foundation