Class SortedHashTree

    • Constructor Detail

      • SortedHashTree

        public SortedHashTree()
      • SortedHashTree

        public SortedHashTree​(Object key)
      • SortedHashTree

        public SortedHashTree​(Collection<?> keys)
      • SortedHashTree

        public SortedHashTree​(Object[] keys)
    • Method Detail

      • createNewTree

        protected HashTree createNewTree()
        Creates a new tree. This method exists to allow inheriting classes to generate the appropriate types of nodes. For instance, when a node is added, it's value is a HashTree. Rather than directly calling the HashTree() constructor, the createNewTree() method is called. Inheriting classes should override these methods and create the appropriate subclass of HashTree.
        Overrides:
        createNewTree in class HashTree
        Returns:
        HashTree
      • createNewTree

        protected HashTree createNewTree​(Object key)
        Creates a new tree. This method exists to allow inheriting classes to generate the appropriate types of nodes. For instance, when a node is added, it's value is a HashTree. Rather than directly calling the HashTree() constructor, the createNewTree() method is called. Inheriting classes should override these methods and create the appropriate subclass of HashTree.
        Overrides:
        createNewTree in class HashTree
        Parameters:
        key - object to use as the key for the top level
        Returns:
        newly created HashTree
      • createNewTree

        protected HashTree createNewTree​(Collection<?> values)
        Creates a new tree. This method exists to allow inheriting classes to generate the appropriate types of nodes. For instance, when a node is added, it's value is a HashTree. Rather than directly calling the HashTree() constructor, the createNewTree() method is called. Inheriting classes should override these methods and create the appropriate subclass of HashTree.
        Overrides:
        createNewTree in class HashTree
        Parameters:
        values - objects to be added to the new HashTree
        Returns:
        newly created HashTree