Package org.eclipse.jetty.util
Class AbstractTrie<V>
- java.lang.Object
-
- org.eclipse.jetty.util.AbstractTrie<V>
-
- Type Parameters:
V- the type of object that the Trie holds
- All Implemented Interfaces:
Trie<V>
- Direct Known Subclasses:
ArrayTernaryTrie,ArrayTrie,TreeTrie
public abstract class AbstractTrie<V> extends java.lang.Object implements Trie<V>
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
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractTrie(boolean insensitive)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vget(java.lang.String s)Get an exact match from a String keyVget(java.nio.ByteBuffer b)Get an exact match from a segment of a ByteBuufer as keyVgetBest(byte[] b, int offset, int len)Get the best match from key in a byte array.VgetBest(java.lang.String s)Get the best match from key in a String.booleanisCaseInsensitive()booleanput(V v)Put a value as both a key and a value.Vremove(java.lang.String s)
-
-
-
Method Detail
-
put
public boolean put(V v)
Description copied from interface:TriePut a value as both a key and a value.
-
get
public V get(java.lang.String s)
Description copied from interface:TrieGet an exact match from a String key
-
get
public V get(java.nio.ByteBuffer b)
Description copied from interface:TrieGet an exact match from a segment of a ByteBuufer as key
-
getBest
public V getBest(java.lang.String s)
Description copied from interface:TrieGet the best match from key in a String.
-
getBest
public V getBest(byte[] b, int offset, int len)
Description copied from interface:TrieGet the best match from key in a byte array. The key is assumed to by ISO_8859_1 characters.
-
isCaseInsensitive
public boolean isCaseInsensitive()
- Specified by:
isCaseInsensitivein interfaceTrie<V>
-
-