// Source code example for "A Practical Introduction // to Data Structures and Algorithm Analysis" // by Clifford A. Shaffer, Prentice Hall, 1998. // Copyright 1998 by Clifford A. Shaffer interface GTNode { // General tree node ADT public Object value(); // Return the value public boolean isLeaf(); // TRUE if this node is a leaf public GTNode parent(); // Return the parent public GTNode leftmost_child(); // Return the leftmost child public GTNode right_sibling(); // Return the right sibling public void setValue(Object value); // Set the value public void setParent(GTNode par); // Set the parent public void insert_first(GTNode n); // Add a new leftmost child public void insert_next(GTNode n); // Insert a new right sibling public void remove_first(); // Remove the leftmost child public void remove_next(); // Remove the right sibling } // interface GTNode