org.hudsonci.maven.model.config.DocumentsDTO Maven / Gradle / Ivy
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2011.12.06 at 07:15:37 PM GMT
//
package org.hudsonci.maven.model.config;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.annotation.Generated;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import com.flipthebird.gwthashcodeequals.EqualsBuilder;
import com.flipthebird.gwthashcodeequals.HashCodeBuilder;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import org.codehaus.jackson.annotate.JsonProperty;
/**
* Java class for documents complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="documents">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="document" type="{http://hudson-ci.org/xsd/hudson/2.1.0/maven/config}document" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "documents", propOrder = {
"documents"
})
@XmlRootElement(name = "documents")
@XStreamAlias("documents")
@Generated(value = "XJC hudson-jaxb-ri-2.1-2", date = "2011-12-06T19:15:37")
public class DocumentsDTO
implements Serializable
{
private final static long serialVersionUID = 1L;
@XmlElement(name = "document", required = true)
@JsonProperty("documents")
protected List documents;
/**
* Gets the value of the documents 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 documents property.
*
*
* For example, to add a new item, do as follows:
*
* getDocuments().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link DocumentDTO }
*
*
*/
public List getDocuments() {
if (documents == null) {
documents = new ArrayList();
}
return this.documents;
}
public DocumentsDTO withDocuments(DocumentDTO... values) {
if (values!= null) {
for (DocumentDTO value: values) {
getDocuments().add(value);
}
}
return this;
}
public DocumentsDTO withDocuments(Collection values) {
if (values!= null) {
getDocuments().addAll(values);
}
return this;
}
@Override
public boolean equals(final Object obj) {
if (obj == null) {
return false;
}
if (this == obj) {
return true;
}
if (!(obj instanceof DocumentsDTO)) {
return false;
}
final DocumentsDTO that = ((DocumentsDTO) obj);
final EqualsBuilder builder = new EqualsBuilder();
builder.append(this.getDocuments(), that.getDocuments());
return builder.build();
}
@Override
public int hashCode() {
final HashCodeBuilder builder = new HashCodeBuilder();
builder.append(this.getDocuments());
return builder.build();
}
}