package classes.holonControlUnit.messages; import java.util.ArrayList; import classes.Holon; public class NeighborhoodMsg { public enum Type { NEW_VIRTUAL_NEIGHBOR, REMOVE_VIRTUAL_NEIGHBOR, NEW_PHYSICAL_NEIGHBOR, REMOVE_PHYSICAL_NEIGHBOR, SEARCH_PHYSICAL_NEIGHBOR_REQ, SEARCH_PHYSICAL_NEIGHBOR_ANS } private Type type; private ArrayList neighbors; private int layer; private String id; public NeighborhoodMsg(Type type, ArrayList newVirtualNeighbor) { super(); this.type = type; this.neighbors = newVirtualNeighbor; } public NeighborhoodMsg(Type type, int layer) { super(); this.type = type; this.layer = layer; } public NeighborhoodMsg(Type type, String id) { super(); this.type = type; this.id = id; } @Override public String toString() { return "NeighborhoodMsg [type=" + type + ", neighbors=" + neighbors + ", layer=" + layer + ", id=" + id + "]"; } public ArrayList getNeighbors() { return neighbors; } public Type getType() { return type; } public int getLayer() { return layer; } public String getId() { return id; } }