/* DirectoryElement.java 1.0 */ /* by Sharon Tuttle */ /* last modified: 2-18-03 */ class DirectoryElement { /*------------------------- fields --------------------------*/ /* the actual directory element at this position in a Directory */ CityEntry dirEntry; /* the NEXT DirectoryElement within the Directory */ DirectoryElement nextInDirectory; /*-------------------------- constructor ---------------------------*/ DirectoryElement(CityEntry desiredEntry) { this.dirEntry = desiredEntry; nextInDirectory = null; } /*--------------------------- accessors ----------------------------*/ CityEntry getDirEntry() { return this.dirEntry; } DirectoryElement getNextInDirectory() { return this.nextInDirectory; } /*------------------------------------------ modifiers ------------------------------------------*/ void setNextInDirectory(DirectoryElement nextInDir) { this.nextInDirectory = nextInDir; } /*------------------------------------------ overridden methods -------------------------------------------*/ public String toString() { /* hmm; I don't think I'll print next in directory... */ return "DirectoryElement[" + this.dirEntry + "]"; } }