|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TwoWayTransformer<S,T>
Specifies both the methods to transform and to retransform an object.
This is a copy of the class with the same name of the moleapipe project.
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 (optional operation). |
T |
transform(S input)
Transforms the input object (leaving it unchanged) into some output object. |
Method Detail |
---|
T transform(S input)
input
- the object to be transformed, should be left unchanged
ClassCastException
- (runtime) if the input is the wrong class
IllegalArgumentException
- (runtime) if the input is invalidS retransform(T input)
transform
.
If implemented, it must at least be ensured thattransform(retransform(input)).equals(input)for all objects, for that the retransformation is defined (that is retransform(input) does not throw an exception).
input
- the object for which the transformation origin is searched.
UnsupportedOperationException
- if not implemented.
ClassCastException
- if the retransformation is not defined for
the class of the input element
IllegalArgumentException
- if the retransformation for the input
object is not definedboolean isRetrievable(T input)
retransform
is implemented for this object and does
not throw an exception.x
returned by retransform
is unique, or more formally:
transform(o1).equals(transform(o2)) ⇒ o1.equals(o2)
retransform(transform(input)).equals(input)for all objects where the retransformation is defined.
input
- the object for which the transformation origin is searched.
true
if the origin of the specified object can
be calculated.
ClassCastException
- if the input value can not be cast to
T
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |