⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 globalvalueref.java

📁 自动生成JAVA-Struts网站的程序
💻 JAVA
字号:
/* * This class was automatically generated with  * <a href="http://castor.exolab.org">Castor 0.9.2</a>, using an * XML Schema. * $Id: GlobalValueRef.java,v 1.2 2002/10/22 06:59:05 javanovic Exp $ */package com.javanovic.karapansapi.xml;  //---------------------------------/ //- Imported classes and packages -///---------------------------------/import java.io.Reader;import java.io.Serializable;import java.io.Writer;import java.util.ArrayList;import java.util.Enumeration;import org.exolab.castor.xml.*;import org.exolab.castor.xml.MarshalException;import org.exolab.castor.xml.ValidationException;import org.xml.sax.DocumentHandler;/** * Pair code/display used by dropdown list/radio button * @version $Revision: 1.2 $ $Date: 2002/10/22 06:59:05 $**/public class GlobalValueRef implements java.io.Serializable {      //--------------------------/     //- Class/Member Variables -/    //--------------------------/    private java.lang.String _name;    private java.util.ArrayList _choiceList;      //----------------/     //- Constructors -/    //----------------/    public GlobalValueRef() {        super();        _choiceList = new ArrayList();    } //-- com.javanovic.karapansapi.xml.GlobalValueRef()      //-----------/     //- Methods -/    //-----------/    /**     *      * @param vChoice    **/    public void addChoice(Choice vChoice)        throws java.lang.IndexOutOfBoundsException    {        _choiceList.add(vChoice);    } //-- void addChoice(Choice)     /**    **/    public void clearChoice()    {        _choiceList.clear();    } //-- void clearChoice()     /**    **/    public java.util.Enumeration enumerateChoice()    {        return new org.exolab.castor.util.IteratorEnumeration(_choiceList.iterator());    } //-- java.util.Enumeration enumerateChoice()     /**     *      * @param index    **/    public Choice getChoice(int index)        throws java.lang.IndexOutOfBoundsException    {        //-- check bounds for index        if ((index < 0) || (index > _choiceList.size())) {            throw new IndexOutOfBoundsException();        }                return (Choice) _choiceList.get(index);    } //-- Choice getChoice(int)     /**    **/    public Choice[] getChoice()    {        int size = _choiceList.size();        Choice[] mArray = new Choice[size];        for (int index = 0; index < size; index++) {            mArray[index] = (Choice) _choiceList.get(index);        }        return mArray;    } //-- Choice[] getChoice()     /**    **/    public int getChoiceCount()    {        return _choiceList.size();    } //-- int getChoiceCount()     /**    **/    public java.lang.String getName()    {        return this._name;    } //-- java.lang.String getName()     /**    **/    public boolean isValid()    {        try {            validate();        }        catch (org.exolab.castor.xml.ValidationException vex) {            return false;        }        return true;    } //-- boolean isValid()     /**     *      * @param out    **/    public void marshal(java.io.Writer out)        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException    {                Marshaller.marshal(this, out);    } //-- void marshal(java.io.Writer)     /**     *      * @param handler    **/    public void marshal(org.xml.sax.DocumentHandler handler)        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException    {                Marshaller.marshal(this, handler);    } //-- void marshal(org.xml.sax.DocumentHandler)     /**     *      * @param vChoice    **/    public boolean removeChoice(Choice vChoice)    {        boolean removed = _choiceList.remove(vChoice);        return removed;    } //-- boolean removeChoice(Choice)     /**     *      * @param index     * @param vChoice    **/    public void setChoice(int index, Choice vChoice)        throws java.lang.IndexOutOfBoundsException    {        //-- check bounds for index        if ((index < 0) || (index > _choiceList.size())) {            throw new IndexOutOfBoundsException();        }        _choiceList.set(index, vChoice);    } //-- void setChoice(int, Choice)     /**     *      * @param choiceArray    **/    public void setChoice(Choice[] choiceArray)    {        //-- copy array        _choiceList.clear();        for (int i = 0; i < choiceArray.length; i++) {            _choiceList.add(choiceArray[i]);        }    } //-- void setChoice(Choice)     /**     *      * @param name    **/    public void setName(java.lang.String name)    {        this._name = name;    } //-- void setName(java.lang.String)     /**     *      * @param reader    **/    public static com.javanovic.karapansapi.xml.GlobalValueRef unmarshal(java.io.Reader reader)        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException    {        return (com.javanovic.karapansapi.xml.GlobalValueRef) Unmarshaller.unmarshal(com.javanovic.karapansapi.xml.GlobalValueRef.class, reader);    } //-- com.javanovic.karapansapi.xml.GlobalValueRef unmarshal(java.io.Reader)     /**    **/    public void validate()        throws org.exolab.castor.xml.ValidationException    {        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();        validator.validate(this);    } //-- void validate() }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -