package classes.holonControlUnit.messages; import java.util.ArrayList; public class MergeMsg { public enum Type { REQ, ACK, ACK_II } private Type type; private float power; private float netThroughput; private ArrayList predictedPowerUsage; private String requester; private int timeStep; private StateMsg state; private ArrayList redirectedBy; private boolean allowOccupiedPath; public MergeMsg(Type type, float power, float netThroughput, ArrayList predictedPowerUsage, String requester, int timeStep, StateMsg state, ArrayList redirectedBy, boolean allowOccupiedPath) { super(); this.type = type; this.power = power; this.netThroughput = netThroughput; this.predictedPowerUsage = predictedPowerUsage; this.requester = requester; this.timeStep = timeStep; this.state = state; this.redirectedBy = redirectedBy; this.allowOccupiedPath = allowOccupiedPath; } @Override public String toString() { return "MergeMsg [type=" + type + ", power=" + power + ", netThroughput=" + netThroughput + ", predictedPowerUsage=" + predictedPowerUsage + ", requester=" + requester + ", timeStep=" + timeStep + ", state=" + state + ", redirectedBy=" + redirectedBy + ", allowOccupiedPath=" + allowOccupiedPath + "]"; } public Type getType() { return type; } public float getPower() { return power; } public ArrayList getPredictedPowerUsage() { return predictedPowerUsage; } public String getRequester() { return requester; } public int getTimeStep() { return timeStep; } public float getNetThroughput() { return netThroughput; } public StateMsg getState() { return state; } public ArrayList getRedirectedBy() { return redirectedBy; } public boolean isAllowOccupiedPath() { return allowOccupiedPath; } }