org.latency4j.configuration.LatencyRequirementGroupConfig Maven / Gradle / Ivy
Show all versions of latency4j Show documentation
package org.latency4j.configuration;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
/**
*
* Encapsulates the {@link LatencyRequirementConfiguration latency requirement
* configurations} as included in an {@link Latency4JConfiguration Latency4J
* configuration}.
*
*/
public class LatencyRequirementGroupConfig implements Serializable {
private static final long serialVersionUID = -6493602067513014823L;
/**
*
* The {@link CappedRequirementConfiguration capped requirement
* configurations}.
*
*/
private List cappedRequirements;
/**
*
* The {@link StatisticalRequirementConfiguration statistical requirement
* configuration}.
*
*/
private List statisticalRequirements;
/**
*
* Default constructor.
*
*/
public LatencyRequirementGroupConfig() {
cappedRequirements = new ArrayList();
statisticalRequirements = new ArrayList();
}
/**
*
* Returns the {@link CappedRequirementConfiguration capped requirement
* configurations} encapsulated by the instance.
*
*
* @return The encapsulated {@link CappedRequirementConfiguration capped
* requirement configurations}.
*/
@XmlElement(name = "cappedRequirement", required = false)
public List getCappedRequirements() {
return cappedRequirements;
}
/**
*
* Sets the {@link CappedRequirementConfiguration capped requirement
* configurations} encapsulated by the instance.
*
*
* @param latencyRequirements
* The {@link CappedRequirementConfiguration capped requirement
* configurations} encapsulated by this instance.
*/
public void setCappedRequirements(final List latencyRequirements) {
this.cappedRequirements = latencyRequirements;
}
/**
*
* Returns the {@link StatisticalRequirementConfiguration statistical
* requirement configurations} encapsulated by the instance.
*
*
* @return The encapsulated {@link StatisticalRequirementConfiguration
* statistical requirement configurations}.
*/
@XmlElement(name = "statisticalRequirement", required = false)
public List getStatisticalRequirements() {
return statisticalRequirements;
}
/**
*
* Sets the {@link StatisticalRequirementConfiguration statistical
* requirement configurations} encapsulated by the instance.
*
*
* @param statisticalRequirements
* The {@link StatisticalRequirementConfiguration statistical
* requirement configurations} encapsulated by this instance.
*/
public void setStatisticalRequirements(final List statisticalRequirements) {
this.statisticalRequirements = statisticalRequirements;
}
@Override
public String toString() {
StringBuffer result = new StringBuffer();
if (cappedRequirements != null) {
result.append("Latency Requirements: \n");
for (LatencyRequirementConfiguration req : cappedRequirements)
result.append(req + "\n");
}
return result.toString();
}
}