/* Copyright 2001 by Ralph Hartley This software is licenced under the terms of the Gnu Public Licence */ import java.io.*; import java.util.*; import org.w3c.dom.*; public class Station implements Serializable,Comparable { private static final long serialVersionUID = 38512345874339L; public String name; TreeSet shots = new TreeSet(); TreeSet arcs = null; Element element; public Station(String name, Element element) { this.name=name; this.element=element; } public int arity() { return(shots.size()); } public void addShot(Shot newshot) { shots.add(newshot); } public String toString() { return(name); } public int compareTo(Object that) { return(toString().compareTo(that.toString())); } public boolean equals(Object that) { return(toString().equals(that.toString())); } }