org.openxmlformats.schemas.spreadsheetml.x2006.main.impl.CTMergeCellsImpl Maven / Gradle / Ivy
/*
* XML Type: CT_MergeCells
* Namespace: http://schemas.openxmlformats.org/spreadsheetml/2006/main
* Java type: org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMergeCells
*
* Automatically generated - do not modify.
*/
package org.openxmlformats.schemas.spreadsheetml.x2006.main.impl;
import javax.xml.namespace.QName;
import org.apache.xmlbeans.QNameSet;
/**
* An XML CT_MergeCells(@http://schemas.openxmlformats.org/spreadsheetml/2006/main).
*
* This is a complex type.
*/
public class CTMergeCellsImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMergeCells {
private static final long serialVersionUID = 1L;
public CTMergeCellsImpl(org.apache.xmlbeans.SchemaType sType) {
super(sType);
}
private static final QName[] PROPERTY_QNAME = {
new QName("http://schemas.openxmlformats.org/spreadsheetml/2006/main", "mergeCell"),
new QName("", "count"),
};
/**
* Gets a List of "mergeCell" elements
*/
@Override
public java.util.List getMergeCellList() {
synchronized (monitor()) {
check_orphaned();
return new org.apache.xmlbeans.impl.values.JavaListXmlObject<>(
this::getMergeCellArray,
this::setMergeCellArray,
this::insertNewMergeCell,
this::removeMergeCell,
this::sizeOfMergeCellArray
);
}
}
/**
* Gets array of all "mergeCell" elements
*/
@Override
public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMergeCell[] getMergeCellArray() {
return getXmlObjectArray(PROPERTY_QNAME[0], new org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMergeCell[0]);
}
/**
* Gets ith "mergeCell" element
*/
@Override
public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMergeCell getMergeCellArray(int i) {
synchronized (monitor()) {
check_orphaned();
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMergeCell target = null;
target = (org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMergeCell)get_store().find_element_user(PROPERTY_QNAME[0], i);
if (target == null) {
throw new IndexOutOfBoundsException();
}
return target;
}
}
/**
* Returns number of "mergeCell" element
*/
@Override
public int sizeOfMergeCellArray() {
synchronized (monitor()) {
check_orphaned();
return get_store().count_elements(PROPERTY_QNAME[0]);
}
}
/**
* Sets array of all "mergeCell" element WARNING: This method is not atomicaly synchronized.
*/
@Override
public void setMergeCellArray(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMergeCell[] mergeCellArray) {
check_orphaned();
arraySetterHelper(mergeCellArray, PROPERTY_QNAME[0]);
}
/**
* Sets ith "mergeCell" element
*/
@Override
public void setMergeCellArray(int i, org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMergeCell mergeCell) {
generatedSetterHelperImpl(mergeCell, PROPERTY_QNAME[0], i, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_ARRAYITEM);
}
/**
* Inserts and returns a new empty value (as xml) as the ith "mergeCell" element
*/
@Override
public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMergeCell insertNewMergeCell(int i) {
synchronized (monitor()) {
check_orphaned();
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMergeCell target = null;
target = (org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMergeCell)get_store().insert_element_user(PROPERTY_QNAME[0], i);
return target;
}
}
/**
* Appends and returns a new empty value (as xml) as the last "mergeCell" element
*/
@Override
public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMergeCell addNewMergeCell() {
synchronized (monitor()) {
check_orphaned();
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMergeCell target = null;
target = (org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMergeCell)get_store().add_element_user(PROPERTY_QNAME[0]);
return target;
}
}
/**
* Removes the ith "mergeCell" element
*/
@Override
public void removeMergeCell(int i) {
synchronized (monitor()) {
check_orphaned();
get_store().remove_element(PROPERTY_QNAME[0], i);
}
}
/**
* Gets the "count" attribute
*/
@Override
public long getCount() {
synchronized (monitor()) {
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[1]);
return (target == null) ? 0L : target.getLongValue();
}
}
/**
* Gets (as xml) the "count" attribute
*/
@Override
public org.apache.xmlbeans.XmlUnsignedInt xgetCount() {
synchronized (monitor()) {
check_orphaned();
org.apache.xmlbeans.XmlUnsignedInt target = null;
target = (org.apache.xmlbeans.XmlUnsignedInt)get_store().find_attribute_user(PROPERTY_QNAME[1]);
return target;
}
}
/**
* True if has "count" attribute
*/
@Override
public boolean isSetCount() {
synchronized (monitor()) {
check_orphaned();
return get_store().find_attribute_user(PROPERTY_QNAME[1]) != null;
}
}
/**
* Sets the "count" attribute
*/
@Override
public void setCount(long count) {
synchronized (monitor()) {
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[1]);
if (target == null) {
target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PROPERTY_QNAME[1]);
}
target.setLongValue(count);
}
}
/**
* Sets (as xml) the "count" attribute
*/
@Override
public void xsetCount(org.apache.xmlbeans.XmlUnsignedInt count) {
synchronized (monitor()) {
check_orphaned();
org.apache.xmlbeans.XmlUnsignedInt target = null;
target = (org.apache.xmlbeans.XmlUnsignedInt)get_store().find_attribute_user(PROPERTY_QNAME[1]);
if (target == null) {
target = (org.apache.xmlbeans.XmlUnsignedInt)get_store().add_attribute_user(PROPERTY_QNAME[1]);
}
target.set(count);
}
}
/**
* Unsets the "count" attribute
*/
@Override
public void unsetCount() {
synchronized (monitor()) {
check_orphaned();
get_store().remove_attribute(PROPERTY_QNAME[1]);
}
}
}