
net.zeroinstall.model.impl.RestrictionImpl Maven / Gradle / Ivy
/*
* XML Type: restriction
* Namespace: http://zero-install.sourceforge.net/2004/injector/interface
* Java type: net.zeroinstall.model.Restriction
*
* Automatically generated - do not modify.
*/
package net.zeroinstall.model.impl;
/**
* An XML restriction(@http://zero-install.sourceforge.net/2004/injector/interface).
*
* This is a complex type.
*/
public class RestrictionImpl extends net.zeroinstall.model.impl.RestrictionBaseImpl implements net.zeroinstall.model.Restriction
{
private static final long serialVersionUID = 1L;
public RestrictionImpl(org.apache.xmlbeans.SchemaType sType)
{
super(sType);
}
private static final javax.xml.namespace.QName VERSION2$0 =
new javax.xml.namespace.QName("http://zero-install.sourceforge.net/2004/injector/interface", "version");
/**
* Gets array of all "version" elements
*/
public net.zeroinstall.model.Constraint[] getVersion2Array()
{
synchronized (monitor())
{
check_orphaned();
java.util.List targetList = new java.util.ArrayList();
get_store().find_all_element_users(VERSION2$0, targetList);
net.zeroinstall.model.Constraint[] result = new net.zeroinstall.model.Constraint[targetList.size()];
targetList.toArray(result);
return result;
}
}
/**
* Gets ith "version" element
*/
public net.zeroinstall.model.Constraint getVersion2Array(int i)
{
synchronized (monitor())
{
check_orphaned();
net.zeroinstall.model.Constraint target = null;
target = (net.zeroinstall.model.Constraint)get_store().find_element_user(VERSION2$0, i);
if (target == null)
{
throw new IndexOutOfBoundsException();
}
return target;
}
}
/**
* Returns number of "version" element
*/
public int sizeOfVersion2Array()
{
synchronized (monitor())
{
check_orphaned();
return get_store().count_elements(VERSION2$0);
}
}
/**
* Sets array of all "version" element
*/
public void setVersion2Array(net.zeroinstall.model.Constraint[] version2Array)
{
synchronized (monitor())
{
check_orphaned();
arraySetterHelper(version2Array, VERSION2$0);
}
}
/**
* Sets ith "version" element
*/
public void setVersion2Array(int i, net.zeroinstall.model.Constraint version2)
{
synchronized (monitor())
{
check_orphaned();
net.zeroinstall.model.Constraint target = null;
target = (net.zeroinstall.model.Constraint)get_store().find_element_user(VERSION2$0, i);
if (target == null)
{
throw new IndexOutOfBoundsException();
}
target.set(version2);
}
}
/**
* Inserts and returns a new empty value (as xml) as the ith "version" element
*/
public net.zeroinstall.model.Constraint insertNewVersion2(int i)
{
synchronized (monitor())
{
check_orphaned();
net.zeroinstall.model.Constraint target = null;
target = (net.zeroinstall.model.Constraint)get_store().insert_element_user(VERSION2$0, i);
return target;
}
}
/**
* Appends and returns a new empty value (as xml) as the last "version" element
*/
public net.zeroinstall.model.Constraint addNewVersion2()
{
synchronized (monitor())
{
check_orphaned();
net.zeroinstall.model.Constraint target = null;
target = (net.zeroinstall.model.Constraint)get_store().add_element_user(VERSION2$0);
return target;
}
}
/**
* Removes the ith "version" element
*/
public void removeVersion2(int i)
{
synchronized (monitor())
{
check_orphaned();
get_store().remove_element(VERSION2$0, i);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy