public class FactoryTransformer<I,O> extends Object implements Transformer<I,O>, Serializable
Constructor and Description |
---|
FactoryTransformer(Factory<? extends O> factory)
Constructor that performs no validation.
|
Modifier and Type | Method and 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 FactoryTransformer(Factory<? extends O> factory)
factoryTransformer
if you want that.factory
- the factory to call, not nullpublic static <I,O> Transformer<I,O> factoryTransformer(Factory<? extends O> factory)
I
- the input typeO
- the output typefactory
- the factory to call, not nullfactory
transformerNullPointerException
- if the factory is nullpublic O transform(I input)
transform
in interface Transformer<I,O>
input
- the input object to transformpublic Factory<? extends O> getFactory()
Copyright © 2001–2019 The Apache Software Foundation. All rights reserved.