package ui.controller;

import java.util.ArrayList;

import classes.AbstractCpsObject;
import classes.HolonElement;
import classes.HolonObject;
import classes.HolonSwitch;
import ui.model.Model;

public class StatsController {

	private Model model;

	public StatsController(Model mod) {
		this.model = mod;

	}

	public void setTrackingObj(ArrayList<AbstractCpsObject> objArr) {
		model.setTrackingObj(objArr);
	}

	public ArrayList<AbstractCpsObject> getTrackingObj() {
		return model.getTrackingObj();
	}

	public void addTrackingObj(AbstractCpsObject obj) {
		model.getTrackingObj().add(obj);
		model.addObjectsToGraphListeners();
	}

	public void removeTrackingObj(AbstractCpsObject obj) {
		ArrayList<AbstractCpsObject> objArr = model.getTrackingObj();
		objArr.remove(obj);
		model.setTrackingObj(objArr);
		model.addObjectsToGraphListeners();
	}
}
