The ideas of this list is to provide a brief overview over the key methods used in the individual classes during the lecture. Chapter: Extending Classes ============================ interface Comparable --------------------- interface for realizing comparisons boolean lessThan(Comparable comp) : <= comparison boolean equal(Comparable comp) : test on equality BetterBufferedReader (BetterBr) ---------------------------------- Extended functionality compared to BufferedReader. all functions of BuffereredReader public int readInt() : reads an int variable from the stream Chapter: Reference Variables ================================== class Node ------------- Class for modeling the individual elements of a list. Contains an reference to the represented object and list reference variables (see lecture) public Node(Object o, Node n) : Creates a new node public void setContent(Object o) : Set the reference variable of the object to store public Object getContent() : Returns the reference to the store object public Node getNextNode() : Returns a reference to the next element in the list public void setNextNode(Node n) : Set the next element in the list public String toString() : outputs the content of the Node class class SingleLinkedList and DoubeLinkedList -------------------------------------------- Class for storing elements in a list. This is a container class. public boolean isEmpty(): Tests if the list is empty public void insertHead(Object o) : inserts an object at the beginning (head) of the list public void insertTail(Object o) : inserts an object at in the end (tail) of the list public void insertAfterNode(Object o, Node node) : inserts an object after the element node. The call node.getNextNode().getContent() will then return o. privat void removeNextNode(Node node) : remove the node.getNextNode() public void removeFirstNode() : remove the first element of the list public Node searchNode(Object o) : searches for an object public void reverseList() : inverts the list public String toString() : converts the list to a String class BinaryTree ----------------- Class for storing elements in a binary tree. public void insert(Object o): inserts a new object to the tree public void remove(Object o): removes the Object o from the tree public void inorder() : Traversal of all elements in in-order fashion (see lecture) public void preorder() : Traversal of all elements in pre-order fashion (see lecture) public void postorder() : Traversal of all elements in post-order fashion (see lecture) Chapter: Hashing ================== class (Simple)HashTable ------------------------ A hashtable is a container class. public SimpleHashtable : creates a HashTable void insert(...) : inserts the element to the HashTable void delete(...) : removes the element from the HashTable search(...) : searches for an element in the HashTable class HashtableElement ----------------------- The element to be stored in a HashTable, similar to a ListNode