/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package inport; import java.util.ArrayList; import java.util.List; /** * * @author topazh_ag */ public abstract class TowUsingTemplate extends OperationTemplate { private List resources; private List resourcesTypes; private double duration; /** * Get the value of resources * * @return the value of resources */ public List getResources() { return resources; } /** * Set the value of resources * * @param resources new value of resources */ public void setResources(List resources) { this.resources = resources; } public List getResourcesTypes() { return resourcesTypes; } public void setResourcesTypes(List resourcesTypes) { this.resourcesTypes = resourcesTypes; } /** * Get the value of duration * * @return the value of duration */ public double getDuration() { return duration; } /** * Set the value of duration * * @param duration new value of duration */ public void setDuration(double duration) { this.duration = duration; } public TowUsingTemplate(double duration, int id, Berth startLocation) { super(id, startLocation); this.resources = new ArrayList<>(); this.resourcesTypes = new ArrayList<>(); this.duration = duration; } public TowUsingTemplate() { this.resources = new ArrayList<>(); this.resourcesTypes = new ArrayList<>(); } @Override public String toString() { String res = ""; boolean first = true; for(Tow eq : resources) { if (!first) res += "," + eq.getId(); else res += eq.getId(); first = false; } return getId() + ";" + "tut" + ";" + ";[" + res +"];"+duration; } }