Apendice 1-3 (TravelInfo.java)

import java.lang.String; import java.util.Vector; import aglet.*; public class TravelInfo extends java.lang.Object implements java.io.Serializable { protected String name; protected String home; protected String data; protected Vector Nodes; protected AgletIdentifier id; TravelInfo(String name, String home, String data, Vector v, AgletIdentifier id) { Nodes = (Vector)v.clone(); this.data = data; this.name = name; this.home = home; this.id = id; } TravelInfo() { data = null; Nodes = new Vector(); name = null; home = null; id = null; } public void setName(String name) { this.name=name; } public String getName() { return name; } public void setHome(String home) { this.home=home; } public String getHome() { return home; } public void setId(AgletIdentifier id) { this.id = id; } public AgletIdentifier getId() { return id; } public void setInfo(String info) { data = info; } public void addNode(String node) { Nodes.addElement((String)node); } public String printNodes() { return (String)Nodes.toString(); } public String getInfo() { return data; } public Vector getNodes() { return (Vector)Nodes; } }