ABSTRACT

In this chapter we present the interfaces and abstract class definitions for the trie node and trie leaf node. One possible implementation (as illustrated in Chapter 37 for the B+-Tree) would be to have the leaf node extend the internal node. Such an implementation would waste space since leaf nodes would inherit instance variables (such as the array of child references) that are not used. The interfaces and classes provided in this chapter provide the foundation for any tree-based data structure in which the leaf nodes are of a different type than the internal nodes. However, for the PatriciaTrie, the desired behavior is to have the node class extend both the internal and leaf node classes.