01: // SimpleAttribute.java
02: // $Id: SimpleAttribute.java,v 1.3 2000/08/16 21:37:53 ylafon Exp $
03: // (c) COPYRIGHT MIT, INRIA and Keio, 1999.
04: // Please first read the full copyright statement in file COPYRIGHT.html
05: package org.w3c.tools.resources;
06:
07: /**
08: * @version $Revision: 1.3 $
09: * @author Benoît Mahé (bmahe@w3.org)
10: */
11: abstract public class SimpleAttribute extends Attribute {
12:
13: /**
14: * Unpickle an attribute from a string.
15: * @param array the String.
16: * @return a Object.
17: */
18: public abstract Object unpickle(String value);
19:
20: /**
21: * Pickle an attribute into a String.
22: * @param array the attribute
23: * @return a String.
24: */
25: public abstract String pickle(Object obj);
26:
27: public String stringify(Object value) {
28: return pickle(value);
29: }
30:
31: public SimpleAttribute(String name, Object def, int flags) {
32: super (name, def, flags);
33: }
34:
35: public SimpleAttribute() {
36: super();
37: }
38:
39: }
|