org.jcon.data
Class IfThenTransform

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

public class IfThenTransform
extends java.lang.Object
implements ObjectTransform

A kind of weird transform - if the original (or property, if "property" is specified) .equals() the ifCondition, then returns the thenResult property, otherwise returns the elseResult property. Alternately, use thenProperty and elseProperty, to specify other properties on the object.

Author:
Paul Reavis Copyright 2000 Partner Software, Inc.

Constructor Summary
IfThenTransform()
           
 
Method Summary
 java.lang.String getElseProperty()
           
 java.lang.Object getElseResult()
           
 java.lang.Object getIfCondition()
           
 java.lang.String getIfProperty()
           
 java.lang.String getThenProperty()
           
 java.lang.Object getThenResult()
           
 void setElseProperty(java.lang.String newProperty)
           
 void setElseResult(java.lang.Object newElseResult)
           
 void setIfCondition(java.lang.Object newIfCondition)
           
 void setIfProperty(java.lang.String newProperty)
           
 void setThenProperty(java.lang.String newProperty)
           
 void setThenResult(java.lang.Object newThenResult)
           
 java.lang.Object transform(java.lang.Object original)
          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

IfThenTransform

public IfThenTransform()
Method Detail

transform

public java.lang.Object transform(java.lang.Object original)
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

getIfCondition

public java.lang.Object getIfCondition()

setIfCondition

public void setIfCondition(java.lang.Object newIfCondition)

getThenResult

public java.lang.Object getThenResult()

setThenResult

public void setThenResult(java.lang.Object newThenResult)

getElseResult

public java.lang.Object getElseResult()

setElseResult

public void setElseResult(java.lang.Object newElseResult)

getIfProperty

public java.lang.String getIfProperty()

setIfProperty

public void setIfProperty(java.lang.String newProperty)

getThenProperty

public java.lang.String getThenProperty()

setThenProperty

public void setThenProperty(java.lang.String newProperty)

getElseProperty

public java.lang.String getElseProperty()

setElseProperty

public void setElseProperty(java.lang.String newProperty)