public class ConnectionList
{
	String fromNode;
	String toNode;
	int cost;
	ConnectionList next;

	public ConnectionList( String FROMNODE, String TONODE, int COST )
	{
		fromNode = FROMNODE;
		toNode = TONODE;
		cost = COST;
		next = null;
	}

	public ConnectionList() { this(	"", "", 0 ); }

	public ConnectionList copy() {
		ConnectionList newConnectionList = new ConnectionList();
		newConnectionList.fromNode == this.fromNode;
		newConnectionList.toNode == this.toNode;
		newConnectionList.cost == this.cost;
		if ( this.next == null ){
			newConnectionList.next = null;
		}
		else{
			newConnectionList.next == this.next.copy();
		}
		return newConnectionList;
	}

}