jfun.yan.xml.nuts.optional
Class ConditionalNut

java.lang.Object
  extended by jfun.yan.xml.nut.Nut
      extended by jfun.yan.xml.nut.ComponentNut
          extended by jfun.yan.xml.nuts.optional.ConditionalNut
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
IfElseNut, UnlessNut

public abstract class ConditionalNut
extends ComponentNut

Super class for binary conditional statement such as if/unless.

It supports three attributes: cond, then, else.

Author:
Ben Yu Nov 11, 2005 11:56:15 AM
See Also:
Serialized Form

Constructor Summary
ConditionalNut()
           
 
Method Summary
 Component getElse()
           
 Component getThen()
           
 boolean isCond()
           
 void set(Component[] branches)
           
 void setCond(boolean cond)
           
 void setElse(Component alternative)
           
 void setThen(Component consequence)
           
 
Methods inherited from class jfun.yan.xml.nut.ComponentNut
eval
 
Methods inherited from class jfun.yan.xml.nut.Nut
cast, checkDuplicate, checkMandatory, checkMandatory, convert, getComponentClassLoader, getId, getNutClassLoader, getNutEnvironment, getParameterWiring, getPropertyWiring, getSequenceNumber, getTagLocation, getTagName, initGloballyDefined, initNutEnvironment, initSequenceNumber, initTagLocation, initTagName, isGloballyDefined, raise, raise, register, registerEagerInstantiation, setId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConditionalNut

public ConditionalNut()
Method Detail

getElse

public Component getElse()

setElse

public void setElse(Component alternative)

isCond

public boolean isCond()

setCond

public void setCond(boolean cond)

getThen

public Component getThen()

setThen

public void setThen(Component consequence)

set

public void set(Component[] branches)