Interface Trie<K,​V>

    • Method Detail

      • prefixMap

        SortedMap<K,​V> prefixMap​(K key)
        Returns a view of this Trie of all elements that are prefixed by the given key.

        In a Trie with fixed size keys, this is essentially a Map.get(Object) operation.

        For example, if the Trie contains 'Anna', 'Anael', 'Analu', 'Andreas', 'Andrea', 'Andres', and 'Anatole', then a lookup of 'And' would return 'Andreas', 'Andrea', and 'Andres'.

        Parameters:
        key - the key used in the search
        Returns:
        a SortedMap view of this Trie with all elements whose key is prefixed by the search key