jfun.yan.xml.nuts.optional
Class IfElseNut

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
              extended by jfun.yan.xml.nuts.optional.IfElseNut
All Implemented Interfaces:
java.io.Serializable

public class IfElseNut
extends ConditionalNut

Nut class for conditional statement. For example:

 <nut name="if" class="IfElseNut"/>
 <components>
   <if cond="true" then="$a" else="$b">
 </components>
 
Evaluates to the component referenced by "b".

The "else" attribute is optional.

Author:
Ben Yu Nov 10, 2005 12:01:47 AM
See Also:
Serialized Form

Constructor Summary
IfElseNut()
           
 
Method Summary
 Component eval()
           
 
Methods inherited from class jfun.yan.xml.nuts.optional.ConditionalNut
getElse, getThen, isCond, set, setCond, setElse, setThen
 
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

IfElseNut

public IfElseNut()
Method Detail

eval

public Component eval()
Specified by:
eval in class ComponentNut