com.microsoft.schemas.office.visio.x2012.main.impl.MastersTypeImpl Maven / Gradle / Ivy
Go to download
XmlBeans generated from the Ecma supplied xsds (since POI 5.0.0, the 5th edition is used):
https://www.ecma-international.org/publications/standards/Ecma-376.htm
/*
* XML Type: Masters_Type
* Namespace: http://schemas.microsoft.com/office/visio/2012/main
* Java type: com.microsoft.schemas.office.visio.x2012.main.MastersType
*
* Automatically generated - do not modify.
*/
package com.microsoft.schemas.office.visio.x2012.main.impl;
/**
* An XML Masters_Type(@http://schemas.microsoft.com/office/visio/2012/main).
*
* This is a complex type.
*/
public class MastersTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.microsoft.schemas.office.visio.x2012.main.MastersType {
private static final long serialVersionUID = 1L;
public MastersTypeImpl(org.apache.xmlbeans.SchemaType sType) {
super(sType);
}
private static final javax.xml.namespace.QName MASTER$0 =
new javax.xml.namespace.QName("http://schemas.microsoft.com/office/visio/2012/main", "Master");
private static final javax.xml.namespace.QName MASTERSHORTCUT$2 =
new javax.xml.namespace.QName("http://schemas.microsoft.com/office/visio/2012/main", "MasterShortcut");
/**
* Gets a List of "Master" elements
*/
public java.util.List getMasterList() {
final class MasterList extends java.util.AbstractList {
@Override
public com.microsoft.schemas.office.visio.x2012.main.MasterType get(int i)
{ return MastersTypeImpl.this.getMasterArray(i); }
@Override
public com.microsoft.schemas.office.visio.x2012.main.MasterType set(int i, com.microsoft.schemas.office.visio.x2012.main.MasterType o) {
com.microsoft.schemas.office.visio.x2012.main.MasterType old = MastersTypeImpl.this.getMasterArray(i);
MastersTypeImpl.this.setMasterArray(i, o);
return old;
}
@Override
public void add(int i, com.microsoft.schemas.office.visio.x2012.main.MasterType o)
{ MastersTypeImpl.this.insertNewMaster(i).set(o); }
@Override
public com.microsoft.schemas.office.visio.x2012.main.MasterType remove(int i) {
com.microsoft.schemas.office.visio.x2012.main.MasterType old = MastersTypeImpl.this.getMasterArray(i);
MastersTypeImpl.this.removeMaster(i);
return old;
}
@Override
public int size()
{ return MastersTypeImpl.this.sizeOfMasterArray(); }
}
synchronized (monitor())
{
check_orphaned();
return new MasterList();
}
}
/**
* Gets array of all "Master" elements
*/
public com.microsoft.schemas.office.visio.x2012.main.MasterType[] getMasterArray() {
return getXmlObjectArray(MASTER$0, new com.microsoft.schemas.office.visio.x2012.main.MasterType[0]);
}
/**
* Gets ith "Master" element
*/
public com.microsoft.schemas.office.visio.x2012.main.MasterType getMasterArray(int i) {
synchronized (monitor())
{
check_orphaned();
com.microsoft.schemas.office.visio.x2012.main.MasterType target = null;
target = (com.microsoft.schemas.office.visio.x2012.main.MasterType)get_store().find_element_user(MASTER$0, i);
if (target == null) {
throw new IndexOutOfBoundsException();
}
return target;
}
}
/**
* Returns number of "Master" element
*/
public int sizeOfMasterArray() {
synchronized (monitor())
{
check_orphaned();
return get_store().count_elements(MASTER$0);
}
}
/**
* Sets array of all "Master" element WARNING: This method is not atomicaly synchronized.
*/
public void setMasterArray(com.microsoft.schemas.office.visio.x2012.main.MasterType[] masterArray) {
check_orphaned();
arraySetterHelper(masterArray, MASTER$0);
}
/**
* Sets ith "Master" element
*/
public void setMasterArray(int i, com.microsoft.schemas.office.visio.x2012.main.MasterType master) {
generatedSetterHelperImpl(master, MASTER$0, i, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_ARRAYITEM);
}
/**
* Inserts and returns a new empty value (as xml) as the ith "Master" element
*/
public com.microsoft.schemas.office.visio.x2012.main.MasterType insertNewMaster(int i) {
synchronized (monitor())
{
check_orphaned();
com.microsoft.schemas.office.visio.x2012.main.MasterType target = null;
target = (com.microsoft.schemas.office.visio.x2012.main.MasterType)get_store().insert_element_user(MASTER$0, i);
return target;
}
}
/**
* Appends and returns a new empty value (as xml) as the last "Master" element
*/
public com.microsoft.schemas.office.visio.x2012.main.MasterType addNewMaster() {
synchronized (monitor())
{
check_orphaned();
com.microsoft.schemas.office.visio.x2012.main.MasterType target = null;
target = (com.microsoft.schemas.office.visio.x2012.main.MasterType)get_store().add_element_user(MASTER$0);
return target;
}
}
/**
* Removes the ith "Master" element
*/
public void removeMaster(int i) {
synchronized (monitor())
{
check_orphaned();
get_store().remove_element(MASTER$0, i);
}
}
/**
* Gets a List of "MasterShortcut" elements
*/
public java.util.List getMasterShortcutList() {
final class MasterShortcutList extends java.util.AbstractList {
@Override
public com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType get(int i)
{ return MastersTypeImpl.this.getMasterShortcutArray(i); }
@Override
public com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType set(int i, com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType o) {
com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType old = MastersTypeImpl.this.getMasterShortcutArray(i);
MastersTypeImpl.this.setMasterShortcutArray(i, o);
return old;
}
@Override
public void add(int i, com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType o)
{ MastersTypeImpl.this.insertNewMasterShortcut(i).set(o); }
@Override
public com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType remove(int i) {
com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType old = MastersTypeImpl.this.getMasterShortcutArray(i);
MastersTypeImpl.this.removeMasterShortcut(i);
return old;
}
@Override
public int size()
{ return MastersTypeImpl.this.sizeOfMasterShortcutArray(); }
}
synchronized (monitor())
{
check_orphaned();
return new MasterShortcutList();
}
}
/**
* Gets array of all "MasterShortcut" elements
*/
public com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType[] getMasterShortcutArray() {
return getXmlObjectArray(MASTERSHORTCUT$2, new com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType[0]);
}
/**
* Gets ith "MasterShortcut" element
*/
public com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType getMasterShortcutArray(int i) {
synchronized (monitor())
{
check_orphaned();
com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType target = null;
target = (com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType)get_store().find_element_user(MASTERSHORTCUT$2, i);
if (target == null) {
throw new IndexOutOfBoundsException();
}
return target;
}
}
/**
* Returns number of "MasterShortcut" element
*/
public int sizeOfMasterShortcutArray() {
synchronized (monitor())
{
check_orphaned();
return get_store().count_elements(MASTERSHORTCUT$2);
}
}
/**
* Sets array of all "MasterShortcut" element WARNING: This method is not atomicaly synchronized.
*/
public void setMasterShortcutArray(com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType[] masterShortcutArray) {
check_orphaned();
arraySetterHelper(masterShortcutArray, MASTERSHORTCUT$2);
}
/**
* Sets ith "MasterShortcut" element
*/
public void setMasterShortcutArray(int i, com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType masterShortcut) {
generatedSetterHelperImpl(masterShortcut, MASTERSHORTCUT$2, i, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_ARRAYITEM);
}
/**
* Inserts and returns a new empty value (as xml) as the ith "MasterShortcut" element
*/
public com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType insertNewMasterShortcut(int i) {
synchronized (monitor())
{
check_orphaned();
com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType target = null;
target = (com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType)get_store().insert_element_user(MASTERSHORTCUT$2, i);
return target;
}
}
/**
* Appends and returns a new empty value (as xml) as the last "MasterShortcut" element
*/
public com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType addNewMasterShortcut() {
synchronized (monitor())
{
check_orphaned();
com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType target = null;
target = (com.microsoft.schemas.office.visio.x2012.main.MasterShortcutType)get_store().add_element_user(MASTERSHORTCUT$2);
return target;
}
}
/**
* Removes the ith "MasterShortcut" element
*/
public void removeMasterShortcut(int i) {
synchronized (monitor())
{
check_orphaned();
get_store().remove_element(MASTERSHORTCUT$2, i);
}
}
}