SystemListRegistry() |
The purpose of this class is primarily for debugging HyperLinkedLists. It allows you to retrieve lists and do various autopsies :) If the HyperLinkedList is created using its named constructor ie: HyperLinkedList myList = new HyperLinkedList("MyListName"); // Creates the list and registers it. Will always add itself to the SystemListRegistry. Note the SystemListRegistry.class is always instantiated and there is no need to ever create it ever. It just is :) It has several static methods. new HyperLinkedList(); // Does NOT add register the list. static HyperLinkedList getSystemList() // Get a reference the System list public static synchronized SystemListRegistry getRegistry() // Get a reference to the registry. void register(SystemListNode tListNode) // Register a list with the SystemListRegistry public void unregister(SystemListNode tListNode) // Un register a list with the SystemListRegistry static HyperLinkedList get(String Name) // Find a List named "Name" NOTE: The SystemListRegisty.class stores objects of type "SystemListNode.class" which is listed below. public class SystemListNode extends Linkable { SystemListNode(HyperLinkedList tList) { parentList = tList; // reference to the actual list. name = tList.listName; // and its name. } } |