org.jcon.data
Class OptionalTransform

java.lang.Object
  extended by org.jcon.data.OptionalTransform
All Implemented Interfaces:
ObjectTransform

public class OptionalTransform
extends java.lang.Object
implements ObjectTransform

A transform that is performed conditionally - if the condition fails the original object is returned.

Author:
Paul Reavis

Constructor Summary
OptionalTransform()
           
 
Method Summary
 UnaryPredicate getCondition()
           
 ObjectTransform getTransform()
           
 void setCondition(UnaryPredicate newCondition)
           
 void setTransform(ObjectTransform newTransform)
           
 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

OptionalTransform

public OptionalTransform()
Method Detail

transform

public java.lang.Object transform(java.lang.Object victim)
Description copied from interface: ObjectTransform
Our one method; this transforms one object into another. Transformation must be nondestructive, but may produce a derived product that is still affected by changes to the original, so beware.

Specified by:
transform in interface ObjectTransform

getTransform

public ObjectTransform getTransform()

setTransform

public void setTransform(ObjectTransform newTransform)

getCondition

public UnaryPredicate getCondition()

setCondition

public void setCondition(UnaryPredicate newCondition)