KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > yan > xml > nuts > MapEntry


1 package jfun.yan.xml.nuts;
2
3 /**
4  * The Nut class for <entry> tag.
5  * <p>
6  * @author Ben Yu
7  * Nov 9, 2005 11:51:38 PM
8  */

9 public class MapEntry extends LiteralNut {
10   private Object JavaDoc key;
11   private Class JavaDoc key_type;
12   
13   public Class JavaDoc getKey_type() {
14     return key_type;
15   }
16   public void setKey_type(Class JavaDoc key_type) {
17     this.key_type = key_type;
18   }
19   public Object JavaDoc getKey() {
20     return key_type==null?key:convert(key_type, key);
21   }
22   public void setKey(Object JavaDoc key) {
23     this.key = key;
24   }
25   void eval(){
26     checkMandatory("key", key);
27     checkMandatory("val", getVal());
28   }
29 }
30
Popular Tags