package org.bench4q.share.models.master;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;

import org.bench4q.share.models.master.statistics.SampleModel;
import org.bench4q.share.models.monitor.ProcessModel;

public class ProcessResponseModel implements MonitorResultBase {

	private List<ProcessModel> processModels;

	public ProcessResponseModel() {
		this.setProcessModels(new ArrayList<ProcessModel>());
	}

	@XmlElementWrapper
	@XmlElement(name = "processModel")
	public List<ProcessModel> getProcessModels() {
		return processModels;
	}

	public void setProcessModels(List<ProcessModel> processModels) {
		this.processModels = processModels;
	}

	public void add(SampleModel model) {
		if (model instanceof ProcessModel) {
			this.getProcessModels().add((ProcessModel) model);
		}
	}

}
