|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.molae.pipe.trafo.AbstractTransformer<S,T>
public abstract class AbstractTransformer<S,T>
Convenience class for implementing transformers.
This class provides a skeletal implementation of the
TwoWayTransformer
interface,
to minimize the effort required to implement this interface.
If the retransformation is not used,
only transform(Object)
has to be implemented.
Constructor Summary | |
---|---|
AbstractTransformer()
|
Method Summary | |
---|---|
boolean |
isRetrievable(T input)
Indicates if the origin of the specified object can be calculated. |
S |
retransform(T input)
Calculates the transformation origin of the specified object. |
abstract T |
transform(S input)
Transforms the input object (leaving it unchanged) into some output object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractTransformer()
Method Detail |
---|
public abstract T transform(S input)
transform
in interface TwoWayTransformer<S,T>
input
- the object to be transformed, should be left unchanged
ClassCastException
- if the input is the wrong class
IllegalArgumentException
- if the input is invalidpublic S retransform(T input)
retransform
in interface TwoWayTransformer<S,T>
input
- the object for which the transformation origin is searched.
UnsupportedOperationException
- alwayspublic boolean isRetrievable(T input)
false
.
isRetrievable
in interface TwoWayTransformer<S,T>
input
- the object for which the transformation origin is searched.
false
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |