|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jcon.data.ConditionalTransform
public class ConditionalTransform
An ObjectTransform which can execute one of two subtransforms based on a condition.
| Constructor Summary | |
|---|---|
ConditionalTransform()
Create a new ConditionalTransform. |
|
| Method Summary | |
|---|---|
ObjectTransform |
getElseTransform()
Optional transform to run if ifCondition evaluates to false. |
UnaryPredicate |
getIfCondition()
Condition which, if it evaluates to true, runs the thenTransform, otherwise runs the elseTransform if it exists. |
ObjectTransform |
getThenTransform()
Transform run if ifCondition evaluates to true. |
void |
setElseTransform(ObjectTransform newElseTransform)
Transform run if ifCondition evaluates to false. |
void |
setIfCondition(UnaryPredicate newIfCondition)
Condition which, if it evaluates to true, runs the thenTransform, otherwise runs the elseTransform if it exists. |
void |
setThenTransform(ObjectTransform newThenTransform)
Transform run if ifCondition evaluates to true. |
java.lang.Object |
transform(java.lang.Object victim)
Our one method; this transforms one object into another. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConditionalTransform()
| Method Detail |
|---|
public java.lang.Object transform(java.lang.Object victim)
ObjectTransform
transform in interface ObjectTransformpublic ObjectTransform getElseTransform()
public void setElseTransform(ObjectTransform newElseTransform)
public UnaryPredicate getIfCondition()
public void setIfCondition(UnaryPredicate newIfCondition)
public ObjectTransform getThenTransform()
public void setThenTransform(ObjectTransform newThenTransform)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||