Class AbstractTrie<V>

  • Type Parameters:
    V - the type of object that the Trie holds
    All Implemented Interfaces:
    Trie<V>
    Direct Known Subclasses:
    ArrayTernaryTrie, ArrayTrie, TreeTrie

    @Deprecated(since="2021-05-27")
    public abstract class AbstractTrie<V>
    extends java.lang.Object
    implements Trie<V>
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
    Abstract Trie implementation.

    Provides some common implementations, which may not be the most efficient. For byte operations, the assumption is made that the charset is ISO-8859-1

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      V get​(java.lang.String s)
      Deprecated.
      Get an exact match from a String key
      V get​(java.nio.ByteBuffer b)
      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)
      Deprecated.
      Get the best match from key in a String.
      boolean isCaseInsensitive()
      Deprecated.
       
      boolean put​(V v)
      Deprecated.
      Put a value as both a key and a value.
      V remove​(java.lang.String s)
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • put

        public boolean put​(V v)
        Deprecated.
        Description copied from interface: Trie
        Put a value as both a key and a value.
        Specified by:
        put in interface Trie<V>
        Parameters:
        v - The value and key
        Returns:
        True if the Trie had capacity to add the field.
      • remove

        public V remove​(java.lang.String s)
        Deprecated.
        Specified by:
        remove in interface Trie<V>
      • get

        public V get​(java.lang.String s)
        Deprecated.
        Description copied from interface: Trie
        Get an exact match from a String key
        Specified by:
        get in interface Trie<V>
        Parameters:
        s - The key
        Returns:
        the value for the string key
      • get

        public V get​(java.nio.ByteBuffer b)
        Deprecated.
        Description copied from interface: Trie
        Get an exact match from a segment of a ByteBuufer as key
        Specified by:
        get in interface Trie<V>
        Parameters:
        b - The buffer
        Returns:
        The value or null if not found
      • getBest

        public V getBest​(java.lang.String s)
        Deprecated.
        Description copied from interface: Trie
        Get the best match from key in a String.
        Specified by:
        getBest in interface Trie<V>
        Parameters:
        s - The string
        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>
        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
      • isCaseInsensitive

        public boolean isCaseInsensitive()
        Deprecated.
        Specified by:
        isCaseInsensitive in interface Trie<V>