org.allurefw.report.Host Maven / Gradle / Ivy
The newest version!
package org.allurefw.report;
import java.io.Serializable;
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.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlType;
/**
* Java class for Host complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Host">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <all>
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="threads" minOccurs="0">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="thread" type="{urn:report.allurefw.org}Thread" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </all>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Host", propOrder = {
})
public class Host implements Serializable
{
private final static long serialVersionUID = 1L;
@XmlElement(required = true)
protected String name;
@XmlElementWrapper
@XmlElement(name = "thread")
protected List threads;
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
public List getThreads() {
if (threads == null) {
threads = new ArrayList();
}
return threads;
}
public void setThreads(List threads) {
this.threads = threads;
}
public Host withName(String value) {
setName(value);
return this;
}
public Host withThreads(Thread... values) {
if (values!= null) {
for (Thread value: values) {
getThreads().add(value);
}
}
return this;
}
public Host withThreads(Collection values) {
if (values!= null) {
getThreads().addAll(values);
}
return this;
}
public Host withThreads(List threads) {
setThreads(threads);
return this;
}
}