All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.schemas.office.visio.x2012.main.impl.CommentListTypeImpl Maven / Gradle / Ivy

/*
 * XML Type:  CommentList_Type
 * Namespace: http://schemas.microsoft.com/office/visio/2012/main
 * Java type: com.microsoft.schemas.office.visio.x2012.main.CommentListType
 *
 * Automatically generated - do not modify.
 */
package com.microsoft.schemas.office.visio.x2012.main.impl;
/**
 * An XML CommentList_Type(@http://schemas.microsoft.com/office/visio/2012/main).
 *
 * This is a complex type.
 */
public class CommentListTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.microsoft.schemas.office.visio.x2012.main.CommentListType {
    private static final long serialVersionUID = 1L;
    
    public CommentListTypeImpl(org.apache.xmlbeans.SchemaType sType) {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName COMMENTENTRY$0 = 
        new javax.xml.namespace.QName("http://schemas.microsoft.com/office/visio/2012/main", "CommentEntry");
    
    
    /**
     * Gets a List of "CommentEntry" elements
     */
    public java.util.List getCommentEntryList() {
        final class CommentEntryList extends java.util.AbstractList {
            @Override
            public com.microsoft.schemas.office.visio.x2012.main.CommentEntryType get(int i)
                { return CommentListTypeImpl.this.getCommentEntryArray(i); }
            
            @Override
            public com.microsoft.schemas.office.visio.x2012.main.CommentEntryType set(int i, com.microsoft.schemas.office.visio.x2012.main.CommentEntryType o) {
                com.microsoft.schemas.office.visio.x2012.main.CommentEntryType old = CommentListTypeImpl.this.getCommentEntryArray(i);
                CommentListTypeImpl.this.setCommentEntryArray(i, o);
                return old;
            }
            
            @Override
            public void add(int i, com.microsoft.schemas.office.visio.x2012.main.CommentEntryType o)
                { CommentListTypeImpl.this.insertNewCommentEntry(i).set(o); }
            
            @Override
            public com.microsoft.schemas.office.visio.x2012.main.CommentEntryType remove(int i) {
                com.microsoft.schemas.office.visio.x2012.main.CommentEntryType old = CommentListTypeImpl.this.getCommentEntryArray(i);
                CommentListTypeImpl.this.removeCommentEntry(i);
                return old;
            }
            
            @Override
            public int size()
                { return CommentListTypeImpl.this.sizeOfCommentEntryArray(); }
            
        }
        
        synchronized (monitor())
        {
            check_orphaned();
            return new CommentEntryList();
        }
    }
    
    /**
     * Gets array of all "CommentEntry" elements
     */
    public com.microsoft.schemas.office.visio.x2012.main.CommentEntryType[] getCommentEntryArray() {
        return getXmlObjectArray(COMMENTENTRY$0, new com.microsoft.schemas.office.visio.x2012.main.CommentEntryType[0]);
    }
    
    /**
     * Gets ith "CommentEntry" element
     */
    public com.microsoft.schemas.office.visio.x2012.main.CommentEntryType getCommentEntryArray(int i) {
        synchronized (monitor())
        {
            check_orphaned();
            com.microsoft.schemas.office.visio.x2012.main.CommentEntryType target = null;
            target = (com.microsoft.schemas.office.visio.x2012.main.CommentEntryType)get_store().find_element_user(COMMENTENTRY$0, i);
            if (target == null) {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "CommentEntry" element
     */
    public int sizeOfCommentEntryArray() {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(COMMENTENTRY$0);
        }
    }
    
    /**
     * Sets array of all "CommentEntry" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setCommentEntryArray(com.microsoft.schemas.office.visio.x2012.main.CommentEntryType[] commentEntryArray) {
        check_orphaned();
        arraySetterHelper(commentEntryArray, COMMENTENTRY$0);
    }
    
    /**
     * Sets ith "CommentEntry" element
     */
    public void setCommentEntryArray(int i, com.microsoft.schemas.office.visio.x2012.main.CommentEntryType commentEntry) {
        generatedSetterHelperImpl(commentEntry, COMMENTENTRY$0, i, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_ARRAYITEM);
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "CommentEntry" element
     */
    public com.microsoft.schemas.office.visio.x2012.main.CommentEntryType insertNewCommentEntry(int i) {
        synchronized (monitor())
        {
            check_orphaned();
            com.microsoft.schemas.office.visio.x2012.main.CommentEntryType target = null;
            target = (com.microsoft.schemas.office.visio.x2012.main.CommentEntryType)get_store().insert_element_user(COMMENTENTRY$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "CommentEntry" element
     */
    public com.microsoft.schemas.office.visio.x2012.main.CommentEntryType addNewCommentEntry() {
        synchronized (monitor())
        {
            check_orphaned();
            com.microsoft.schemas.office.visio.x2012.main.CommentEntryType target = null;
            target = (com.microsoft.schemas.office.visio.x2012.main.CommentEntryType)get_store().add_element_user(COMMENTENTRY$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "CommentEntry" element
     */
    public void removeCommentEntry(int i) {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(COMMENTENTRY$0, i);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy