Apendice 1-2 (AgletInfo.java)

import java.util.Vector; import java.util.Date; import aglet.*; public class AgletInfo extends java.lang.Object { protected Vector Nodes; protected AgletIdentifier id; protected AgletProxy proxy; protected String name; protected Date date; protected String info; public AgletInfo(String name, Vector v, AgletProxy proxy, AgletIdentifier id, String info) { this.name = name; Nodes = (Vector)v.clone(); this.id = id; this.proxy = proxy; this.info = info; date = new Date(); } public AgletInfo() { name = null; Nodes = new Vector(); id = null; proxy = null; info = null; date = new Date(); } public void setName(String name) { this.name = name; } public String getName() { return name; } public void setProxy(AgletProxy proxy) { this.proxy = proxy; } public AgletProxy getProxy() { return (AgletProxy)proxy; } public void setId(AgletIdentifier id) { this.id = id; } public void addNode(String node) { Nodes.addElement(node); } public String printNodes() { return Nodes.toString(); } public void setNodes(Vector v) { Nodes = (Vector)v.clone(); } public AgletIdentifier getId() { return (AgletIdentifier)id; } public void reset() { id = null; Nodes.removeAllElements(); id = null; proxy = null; } public Vector getNodes() { return (Vector)Nodes; } public void setInfo(String info) { this.info=info; } public String getInfo() { return info; } public String getDate() { return date.toString(); } /* public int hashCode() { java.util.Random x = new java.util.Random(); return x.nextInt(); }*/ }