package org.ehcache.xml.model;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlType;
import org.w3c.dom.Element;
Java class for resources-type complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="resources-type">
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<sequence>
<element ref="{http://www.ehcache.org/v3}resource" maxOccurs="unbounded"/>
</sequence>
</restriction>
</complexContent>
</complexType>
/**
* <p>Java class for resources-type complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="resources-type">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://www.ehcache.org/v3}resource" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "resources-type", propOrder = {
"resource"
})
public class ResourcesType {
@XmlAnyElement
protected List<Element> resource;
Gets the value of the resource property.
This accessor method returns a reference to the live list,
not a snapshot. Therefore any modification you make to the
returned list will be present inside the JAXB object.
This is why there is not a set
method for the resource property.
For example, to add a new item, do as follows:
getResource().add(newItem);
Objects of the following type(s) are allowed in the list Element
/**
* Gets the value of the resource property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the resource property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getResource().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
*
*
*/
public List<Element> getResource() {
if (resource == null) {
resource = new ArrayList<Element>();
}
return this.resource;
}
public ResourcesType withResource(Element... values) {
if (values!= null) {
for (Element value: values) {
getResource().add(value);
}
}
return this;
}
public ResourcesType withResource(Collection<Element> values) {
if (values!= null) {
getResource().addAll(values);
}
return this;
}
}