📄 beantemplates.java
字号:
/* * This class was automatically generated with * <a href="http://www.castor.org">Castor 0.9.4.3</a>, using an XML * Schema. * $Id: BeanTemplates.java,v 1.2 2003/09/05 02:51:42 sutter2k Exp $ */package com.sutternow.templates; //---------------------------------/ //- Imported classes and packages -///---------------------------------/import java.io.IOException;import java.io.Reader;import java.io.Serializable;import java.io.Writer;import java.util.Enumeration;import java.util.Vector;import org.exolab.castor.xml.MarshalException;import org.exolab.castor.xml.Marshaller;import org.exolab.castor.xml.Unmarshaller;import org.exolab.castor.xml.ValidationException;import org.xml.sax.ContentHandler;/** * Class BeanTemplates. * * @version $Revision: 1.2 $ $Date: 2003/09/05 02:51:42 $ */public class BeanTemplates implements java.io.Serializable { //--------------------------/ //- Class/Member Variables -/ //--------------------------/ /** * Field _listingList */ private java.util.Vector _listingList; //----------------/ //- Constructors -/ //----------------/ public BeanTemplates() { super(); _listingList = new Vector(); } //-- com.sutternow.templates.BeanTemplates() //-----------/ //- Methods -/ //-----------/ /** * Method addListing * * @param vListing */ public void addListing(com.sutternow.templates.Listing vListing) throws java.lang.IndexOutOfBoundsException { _listingList.addElement(vListing); } //-- void addListing(com.sutternow.templates.Listing) /** * Method addListing * * @param index * @param vListing */ public void addListing(int index, com.sutternow.templates.Listing vListing) throws java.lang.IndexOutOfBoundsException { _listingList.insertElementAt(vListing, index); } //-- void addListing(int, com.sutternow.templates.Listing) /** * Method enumerateListing */ public java.util.Enumeration enumerateListing() { return _listingList.elements(); } //-- java.util.Enumeration enumerateListing() /** * Method getListing * * @param index */ public com.sutternow.templates.Listing getListing(int index) throws java.lang.IndexOutOfBoundsException { //-- check bounds for index if ((index < 0) || (index > _listingList.size())) { throw new IndexOutOfBoundsException(); } return (com.sutternow.templates.Listing) _listingList.elementAt(index); } //-- com.sutternow.templates.Listing getListing(int) /** * Method getListing */ public com.sutternow.templates.Listing[] getListing() { int size = _listingList.size(); com.sutternow.templates.Listing[] mArray = new com.sutternow.templates.Listing[size]; for (int index = 0; index < size; index++) { mArray[index] = (com.sutternow.templates.Listing) _listingList.elementAt(index); } return mArray; } //-- com.sutternow.templates.Listing[] getListing() /** * Method getListingCount */ public int getListingCount() { return _listingList.size(); } //-- int getListingCount() /** * Method isValid */ public boolean isValid() { try { validate(); } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; } //-- boolean isValid() /** * Method marshal * * @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) /** * Method marshal * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, handler); } //-- void marshal(org.xml.sax.ContentHandler) /** * Method removeAllListing */ public void removeAllListing() { _listingList.removeAllElements(); } //-- void removeAllListing() /** * Method removeListing * * @param index */ public com.sutternow.templates.Listing removeListing(int index) { java.lang.Object obj = _listingList.elementAt(index); _listingList.removeElementAt(index); return (com.sutternow.templates.Listing) obj; } //-- com.sutternow.templates.Listing removeListing(int) /** * Method setListing * * @param index * @param vListing */ public void setListing(int index, com.sutternow.templates.Listing vListing) throws java.lang.IndexOutOfBoundsException { //-- check bounds for index if ((index < 0) || (index > _listingList.size())) { throw new IndexOutOfBoundsException(); } _listingList.setElementAt(vListing, index); } //-- void setListing(int, com.sutternow.templates.Listing) /** * Method setListing * * @param listingArray */ public void setListing(com.sutternow.templates.Listing[] listingArray) { //-- copy array _listingList.removeAllElements(); for (int i = 0; i < listingArray.length; i++) { _listingList.addElement(listingArray[i]); } } //-- void setListing(com.sutternow.templates.Listing) /** * Method unmarshal * * @param reader */ public static com.sutternow.templates.BeanTemplates unmarshal(java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (com.sutternow.templates.BeanTemplates) Unmarshaller.unmarshal(com.sutternow.templates.BeanTemplates.class, reader); } //-- com.sutternow.templates.BeanTemplates unmarshal(java.io.Reader) /** * Method validate */ 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 + -