Class TreeTrie<V>

  • Type Parameters:
    V - the entry type
    All Implemented Interfaces:
    Trie<V>

    @Deprecated(since="2021-05-27")
    public class TreeTrie<V>
    extends AbstractTrie<V>
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
    A Trie String lookup data structure using a tree

    This implementation is always case insensitive and is optimal for a variable number of fixed strings with few special characters.

    This Trie is stored in a Tree and is unlimited in capacity

    This Trie is not Threadsafe and contains no mutual exclusion or deliberate memory barriers. It is intended for an TreeTrie to be built by a single thread and then used concurrently by multiple threads and not mutated during that access. If concurrent mutations of the Trie is required external locks need to be applied.

    • Constructor Summary

      Constructors 
      Constructor Description
      TreeTrie()
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void clear()
      Deprecated.
       
      V get​(java.lang.String s, int offset, int len)
      Deprecated.
      Get an exact match from a String key
      V get​(java.nio.ByteBuffer b, int offset, int len)
      Deprecated.
      Get an exact match from a segment of a ByteBuufer as key
      V getBest​(byte[] b, int offset, int len)
      Deprecated.
      Get the best match from key in a byte array.
      V getBest​(java.lang.String s, int offset, int len)
      Deprecated.
      Get the best match from key in a String.
      V getBest​(java.nio.ByteBuffer b, int offset, int len)
      Deprecated.
      Get the best match from key in a byte buffer.
      boolean isFull()
      Deprecated.
       
      java.util.Set<java.lang.String> keySet()
      Deprecated.
       
      boolean put​(java.lang.String s, V v)
      Deprecated.
      Put an entry into the Trie
      java.lang.String toString()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TreeTrie

        public TreeTrie()
        Deprecated.
    • Method Detail

      • clear

        public void clear()
        Deprecated.
      • put

        public boolean put​(java.lang.String s,
                           V v)
        Deprecated.
        Description copied from interface: Trie
        Put an entry into the Trie
        Parameters:
        s - The key for the entry
        v - The value of the entry
        Returns:
        True if the Trie had capacity to add the field.
      • get

        public V get​(java.lang.String s,
                     int offset,
                     int len)
        Deprecated.
        Description copied from interface: Trie
        Get an exact match from a String key
        Parameters:
        s - The key
        offset - The offset within the string of the key
        len - the length of the key
        Returns:
        the value for the string / offset / length
      • get

        public V get​(java.nio.ByteBuffer b,
                     int offset,
                     int len)
        Deprecated.
        Description copied from interface: Trie
        Get an exact match from a segment of a ByteBuufer as key
        Parameters:
        b - The buffer
        offset - The offset within the buffer of the key
        len - the length of the key
        Returns:
        The value or null if not found
      • getBest

        public V getBest​(byte[] b,
                         int offset,
                         int len)
        Deprecated.
        Description copied from interface: Trie
        Get the best match from key in a byte array. The key is assumed to by ISO_8859_1 characters.
        Specified by:
        getBest in interface Trie<V>
        Overrides:
        getBest in class AbstractTrie<V>
        Parameters:
        b - The buffer
        offset - The offset within the array of the key
        len - the length of the key
        Returns:
        The value or null if not found
      • getBest

        public V getBest​(java.lang.String s,
                         int offset,
                         int len)
        Deprecated.
        Description copied from interface: Trie
        Get the best match from key in a String.
        Parameters:
        s - The string
        offset - The offset within the string of the key
        len - the length of the key
        Returns:
        The value or null if not found
      • getBest

        public V getBest​(java.nio.ByteBuffer b,
                         int offset,
                         int len)
        Deprecated.
        Description copied from interface: Trie
        Get the best match from key in a byte buffer. The key is assumed to by ISO_8859_1 characters.
        Parameters:
        b - The buffer
        offset - The offset within the buffer of the key
        len - the length of the key
        Returns:
        The value or null if not found
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object
      • keySet

        public java.util.Set<java.lang.String> keySet()
        Deprecated.
      • isFull

        public boolean isFull()
        Deprecated.