Annotation of java/classes/org/w3c/tools/resources/StringArrayAttribute.java, revision 1.3

1.1       bmahe       1: // StringArrayAttribute.java
1.3     ! ylafon      2: // $Id: StringArrayAttribute.java,v 1.2.2.4 1999/07/23 13:19:13 bmahe Exp $
1.1       bmahe       3: // (c) COPYRIGHT MIT and INRIA, 1996.
                      4: // Please first read the full copyright statement in file COPYRIGHT.html
                      5: 
                      6: package org.w3c.tools.resources ;
                      7: 
                      8: import java.io.* ;
                      9: 
                     10: /**
                     11:  * The generic description of an StringArrayAttribute.
                     12:  */
                     13: 
1.3     ! ylafon     14: public class StringArrayAttribute extends ArrayAttribute {
1.1       bmahe      15: 
                     16:     /**
                     17:      * Is the given object a valid StringArrayAttribute value ?
                     18:      * @param obj The object to test.
                     19:      * @return A boolean <strong>true</strong> if okay.
                     20:      */
                     21: 
                     22:     public boolean checkValue(Object obj) {
                     23:        return (obj instanceof String[]) ;
                     24:     }
                     25:      
1.3     ! ylafon     26:     public String[] pickle(Object array) {
        !            27:        return (String[])array;
1.1       bmahe      28:     }
                     29: 
1.3     ! ylafon     30:     public Object unpickle (String array[]) {
        !            31:        if (array.length < 1)
        !            32:            return null;
        !            33:        return array;
1.1       bmahe      34:     }
                     35:      
                     36:     public StringArrayAttribute(String name, String def[], int flags) {
                     37:        super(name, def, flags) ;
1.3     ! ylafon     38:        this.type = "[Ljava.lang.String;";
        !            39:     }
        !            40: 
        !            41:     public StringArrayAttribute() {
        !            42:        super() ;
        !            43:        this.type = "[Ljava.lang.String;";
1.1       bmahe      44:     }
                     45: 
                     46: }

Webmaster