com.microsoft.schemas.office.visio.x2012.main.impl.EventListTypeImpl Maven / Gradle / Ivy
/*
* XML Type: EventList_Type
* Namespace: http://schemas.microsoft.com/office/visio/2012/main
* Java type: com.microsoft.schemas.office.visio.x2012.main.EventListType
*
* Automatically generated - do not modify.
*/
package com.microsoft.schemas.office.visio.x2012.main.impl;
/**
* An XML EventList_Type(@http://schemas.microsoft.com/office/visio/2012/main).
*
* This is a complex type.
*/
public class EventListTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.microsoft.schemas.office.visio.x2012.main.EventListType
{
private static final long serialVersionUID = 1L;
public EventListTypeImpl(org.apache.xmlbeans.SchemaType sType)
{
super(sType);
}
private static final javax.xml.namespace.QName EVENTITEM$0 =
new javax.xml.namespace.QName("http://schemas.microsoft.com/office/visio/2012/main", "EventItem");
/**
* Gets a List of "EventItem" elements
*/
public java.util.List getEventItemList()
{
final class EventItemList extends java.util.AbstractList
{
@Override
public com.microsoft.schemas.office.visio.x2012.main.EventItemType get(int i)
{ return EventListTypeImpl.this.getEventItemArray(i); }
@Override
public com.microsoft.schemas.office.visio.x2012.main.EventItemType set(int i, com.microsoft.schemas.office.visio.x2012.main.EventItemType o)
{
com.microsoft.schemas.office.visio.x2012.main.EventItemType old = EventListTypeImpl.this.getEventItemArray(i);
EventListTypeImpl.this.setEventItemArray(i, o);
return old;
}
@Override
public void add(int i, com.microsoft.schemas.office.visio.x2012.main.EventItemType o)
{ EventListTypeImpl.this.insertNewEventItem(i).set(o); }
@Override
public com.microsoft.schemas.office.visio.x2012.main.EventItemType remove(int i)
{
com.microsoft.schemas.office.visio.x2012.main.EventItemType old = EventListTypeImpl.this.getEventItemArray(i);
EventListTypeImpl.this.removeEventItem(i);
return old;
}
@Override
public int size()
{ return EventListTypeImpl.this.sizeOfEventItemArray(); }
}
synchronized (monitor())
{
check_orphaned();
return new EventItemList();
}
}
/**
* Gets array of all "EventItem" elements
* @deprecated
*/
@Deprecated
public com.microsoft.schemas.office.visio.x2012.main.EventItemType[] getEventItemArray()
{
synchronized (monitor())
{
check_orphaned();
java.util.List targetList = new java.util.ArrayList();
get_store().find_all_element_users(EVENTITEM$0, targetList);
com.microsoft.schemas.office.visio.x2012.main.EventItemType[] result = new com.microsoft.schemas.office.visio.x2012.main.EventItemType[targetList.size()];
targetList.toArray(result);
return result;
}
}
/**
* Gets ith "EventItem" element
*/
public com.microsoft.schemas.office.visio.x2012.main.EventItemType getEventItemArray(int i)
{
synchronized (monitor())
{
check_orphaned();
com.microsoft.schemas.office.visio.x2012.main.EventItemType target = null;
target = (com.microsoft.schemas.office.visio.x2012.main.EventItemType)get_store().find_element_user(EVENTITEM$0, i);
if (target == null)
{
throw new IndexOutOfBoundsException();
}
return target;
}
}
/**
* Returns number of "EventItem" element
*/
public int sizeOfEventItemArray()
{
synchronized (monitor())
{
check_orphaned();
return get_store().count_elements(EVENTITEM$0);
}
}
/**
* Sets array of all "EventItem" element WARNING: This method is not atomicaly synchronized.
*/
public void setEventItemArray(com.microsoft.schemas.office.visio.x2012.main.EventItemType[] eventItemArray)
{
check_orphaned();
arraySetterHelper(eventItemArray, EVENTITEM$0);
}
/**
* Sets ith "EventItem" element
*/
public void setEventItemArray(int i, com.microsoft.schemas.office.visio.x2012.main.EventItemType eventItem)
{
generatedSetterHelperImpl(eventItem, EVENTITEM$0, i, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_ARRAYITEM);
}
/**
* Inserts and returns a new empty value (as xml) as the ith "EventItem" element
*/
public com.microsoft.schemas.office.visio.x2012.main.EventItemType insertNewEventItem(int i)
{
synchronized (monitor())
{
check_orphaned();
com.microsoft.schemas.office.visio.x2012.main.EventItemType target = null;
target = (com.microsoft.schemas.office.visio.x2012.main.EventItemType)get_store().insert_element_user(EVENTITEM$0, i);
return target;
}
}
/**
* Appends and returns a new empty value (as xml) as the last "EventItem" element
*/
public com.microsoft.schemas.office.visio.x2012.main.EventItemType addNewEventItem()
{
synchronized (monitor())
{
check_orphaned();
com.microsoft.schemas.office.visio.x2012.main.EventItemType target = null;
target = (com.microsoft.schemas.office.visio.x2012.main.EventItemType)get_store().add_element_user(EVENTITEM$0);
return target;
}
}
/**
* Removes the ith "EventItem" element
*/
public void removeEventItem(int i)
{
synchronized (monitor())
{
check_orphaned();
get_store().remove_element(EVENTITEM$0, i);
}
}
}