public abstract class AbstractTransformer<K,L> extends Object implements Transformer<K,L>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractTransformer.LastResultAwareState<K,L> |
| Modifier and Type | Field and Description |
|---|---|
protected AttributeBuilder |
attributeBuilder |
protected Attribute<AbstractTransformer.LastResultAwareState<K,L>> |
stateAttr |
| Constructor and Description |
|---|
AbstractTransformer() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, hasInputRemainingprotected final AttributeBuilder attributeBuilder
protected final Attribute<AbstractTransformer.LastResultAwareState<K,L>> stateAttr
protected String getNamePrefix()
public final TransformationResult<K,L> transform(AttributeStorage storage, K input) throws TransformationException
TransformerAttributeStorage).transform in interface Transformer<K,L>storage - the external state storage, where Transformer could
get/put a state.TransformationResultTransformationExceptionprotected abstract TransformationResult<K,L> transformImpl(AttributeStorage storage, K input) throws TransformationException
TransformationExceptionpublic final TransformationResult<K,L> getLastResult(AttributeStorage storage)
TransformergetLastResult in interface Transformer<K,L>storage - the external state storage, where Transformer
could retrieve or store its state.protected final TransformationResult<K,L> saveLastResult(AttributeStorage storage, TransformationResult<K,L> result)
public void release(AttributeStorage storage)
Transformerrelease in interface Transformer<K,L>storage - the external state storage, where Transformer
could retrieve or store its state.protected MemoryManager obtainMemoryManager(AttributeStorage storage)
public MemoryManager getMemoryManager()
public void setMemoryManager(MemoryManager memoryManager)
public static <T> T getValue(AttributeStorage storage, Attribute<T> attribute, T defaultValue)
protected final AbstractTransformer.LastResultAwareState<K,L> obtainStateObject(AttributeStorage storage)
protected AbstractTransformer.LastResultAwareState<K,L> createStateObject()
Copyright © 2013 Oracle Corporation. All Rights Reserved.