KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > yan > xml > nuts > optional > Case


1 package jfun.yan.xml.nuts.optional;
2
3 import jfun.yan.Component;
4 import jfun.yan.xml.nuts.DelegatingNut;
5
6
7 /**
8  * The <case> sub-element in the <switch> tag.
9  * <p>
10  * @author Ben Yu
11  * Nov 11, 2005 3:42:43 PM
12  */

13 public class Case extends DelegatingNut {
14   private Object JavaDoc of;
15
16   public Object JavaDoc getOf() {
17     return of;
18   }
19
20   public void setOf(Object JavaDoc of) {
21     this.of = of;
22   }
23   public Component eval(){
24     checkMandatory("of", of);
25     return getMandatory();
26   }
27 }
28
Popular Tags