KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > tests > jfun > yan > xml > models > HumanNut


1 package tests.jfun.yan.xml.models;
2
3 import jfun.yan.Component;
4 import jfun.yan.Components;
5 import jfun.yan.xml.nut.ComponentNut;
6
7 public class HumanNut extends ComponentNut {
8
9   private Fruit fruit;
10   
11   public Fruit getFruit() {
12     return fruit;
13   }
14
15   public void setFruit(Fruit fruit) {
16     this.fruit = fruit;
17   }
18
19   public Component eval() throws Exception JavaDoc {
20     checkMandatory("fruit", fruit);
21     return Components.value(new Human(fruit));
22   }
23
24 }
25
Popular Tags