|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.japaki.basic.FixedTargetTransformer<T>
public class FixedTargetTransformer<T>
A transformer that always returns a constant value.
Constructor Summary | |
---|---|
protected |
FixedTargetTransformer(T target)
Creates a new transformer with the given target value. |
Method Summary | ||
---|---|---|
boolean |
isRetrievable(T input)
Returns false . |
|
static
|
newInstance(T target)
Creates a new transformer with the given target value. |
|
Object |
retransform(T input)
Not implemented. |
|
T |
transform(Object input)
Always returns the predefined target value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected FixedTargetTransformer(T target)
target
- the fixed target value for the new transformerMethod Detail |
---|
public static <T> TwoWayTransformer<Object,T> newInstance(T target)
target
- the fixed target value for the new transformer
public T transform(Object input)
transform
in interface TwoWayTransformer<Object,T>
input
- ignored
public Object retransform(T input)
retransform
in interface TwoWayTransformer<Object,T>
input
- the object for which the transformation origin is searched.
UnsupportedOperationException
- alwayspublic boolean isRetrievable(T input)
false
.
isRetrievable
in interface TwoWayTransformer<Object,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 |