Top Description Fields Constructors Methods
org.eclipse.jetty.util

pack-priv Class EmptyTrie<V>

extends AbstractTrie<V>
Class Inheritance
Type Parameters
<V>
the entry type
Imports
java.nio.ByteBuffer, java.util.Collections, .Map, .Objects, .Set

An empty trie implementation that never contains anything and never accepts new entries.

Field Summary

Modifier and TypeField and Description
private static final EmptyTrie<V>
private static final EmptyTrie<V>
Inherited from org.eclipse.jetty.util.AbstractTrie:
_caseSensitive

Constructor Summary

AccessConstructor and Description
private
EmptyTrie(boolean caseSensitive)

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Implements org.eclipse.jetty.util.Index.Mutable.clear.

Remove all entries from the index.
public V
get(String
The key
s
)

Overrides org.eclipse.jetty.util.AbstractTrie.get.

Implements org.eclipse.jetty.util.Index.get.

Get an exact match from a String key
public V
get(ByteBuffer
The buffer
b
)

Overrides org.eclipse.jetty.util.AbstractTrie.get.

Implements org.eclipse.jetty.util.Index.get.

Get an exact match from a segment of a ByteBuffer as key
public V
get(String
The key
s
,
int
The offset within the string of the key
offset
,
int
the length of the key
len
)

Implements org.eclipse.jetty.util.Index.get.

Get an exact match from a String key
public V
get(ByteBuffer
The buffer
b
,
int
The offset within the buffer of the key
offset
,
int
the length of the key
len
)

Implements org.eclipse.jetty.util.Index.get.

Get an exact match from a segment of a ByteBuffer as key
public V
getBest(String
The string
s
)

Overrides org.eclipse.jetty.util.AbstractTrie.getBest.

Implements org.eclipse.jetty.util.Index.getBest.

Get the best match from key in a String, which may be a prefix match or an exact match.
public V
getBest(byte[]
The buffer
b
,
int
The offset within the array of the key
offset
,
int
the length of the key
len
)

Overrides org.eclipse.jetty.util.AbstractTrie.getBest.

Implements org.eclipse.jetty.util.Index.getBest.

Get the best match from key in a byte array.
public V
getBest(ByteBuffer
The buffer
b
)

Overrides default org.eclipse.jetty.util.Index.getBest.

Get the best match from key in a byte buffer.
public V
getBest(byte[]
The buffer
b
)

Overrides default org.eclipse.jetty.util.Index.getBest.

Get the best match from key in a byte array.
public V
getBest(String
The string
s
,
int
The offset within the string of the key
offset
,
int
the length of the key
len
)

Implements org.eclipse.jetty.util.Index.getBest.

Get the best match from key in a String.
public V
getBest(ByteBuffer
The buffer
b
,
int
The offset within the buffer of the key
offset
,
int
the length of the key
len
)

Implements org.eclipse.jetty.util.Index.getBest.

Get the best match from key in a byte buffer.
public static <V> EmptyTrie<V>
instance(boolean caseSensitive)

public boolean
isEmpty()

Implements org.eclipse.jetty.util.Index.isEmpty.

Check if the index contains any entry.
public Set<String>
keySet()

Implements org.eclipse.jetty.util.Index.keySet.

Get a Set of the keys contained in this index.
public boolean
put(V
The value and key
v
)

Overrides org.eclipse.jetty.util.AbstractTrie.put.

Implements org.eclipse.jetty.util.Index.Mutable.put.

Put a value as both a key and a value.
public boolean
put(String
The key for the entry. Must be non null, but can be empty.
s
,
V
The value of the entry. Must be non null.
v
)

Implements org.eclipse.jetty.util.Index.Mutable.put.

Put an entry into the index.
protected boolean
public int
size()

Implements org.eclipse.jetty.util.Index.size.

Get the number of entries in the index.
Inherited from org.eclipse.jetty.util.AbstractTrie:
isCaseInsensitiveisCaseSensitiveremoverequiredCapacity

Field Detail

INSENSITIVEback to summary
private static final EmptyTrie<V> INSENSITIVE
Annotations
@SuppressWarnings:rawtypes
SENSITIVEback to summary
private static final EmptyTrie<V> SENSITIVE
Annotations
@SuppressWarnings:rawtypes

Constructor Detail

EmptyTrieback to summary
private EmptyTrie(boolean caseSensitive)

Method Detail

clearback to summary
public void clear()

Implements org.eclipse.jetty.util.Index.Mutable.clear.

Doc from org.eclipse.jetty.util.Index.Mutable.clear.

Remove all entries from the index.

Annotations
@Override
getback to summary
public V get(String s)

Overrides org.eclipse.jetty.util.AbstractTrie.get.

Implements org.eclipse.jetty.util.Index.get.

Doc from org.eclipse.jetty.util.Index.get.

Get an exact match from a String key

Parameters
s:String

The key

Returns:V

the value for the string key

Annotations
@Override
getback to summary
public V get(ByteBuffer b)

Overrides org.eclipse.jetty.util.AbstractTrie.get.

Implements org.eclipse.jetty.util.Index.get.

Doc from org.eclipse.jetty.util.Index.get.

Get an exact match from a segment of a ByteBuffer as key

Parameters
b:ByteBuffer

The buffer

Returns:V

The value or null if not found

Annotations
@Override
getback to summary
public V get(String s, int offset, int len)

Implements org.eclipse.jetty.util.Index.get.

Doc from org.eclipse.jetty.util.Index.get.

Get an exact match from a String key

Parameters
s:String

The key

offset:int

The offset within the string of the key

len:int

the length of the key

Returns:V

the value for the string / offset / length

Annotations
@Override
getback to summary
public V get(ByteBuffer b, int offset, int len)

Implements org.eclipse.jetty.util.Index.get.

Doc from org.eclipse.jetty.util.Index.get.

Get an exact match from a segment of a ByteBuffer as key

Parameters
b:ByteBuffer

The buffer

offset:int

The offset within the buffer of the key

len:int

the length of the key

Returns:V

The value or null if not found

Annotations
@Override
getBestback to summary
public V getBest(String s)

Overrides org.eclipse.jetty.util.AbstractTrie.getBest.

Implements org.eclipse.jetty.util.Index.getBest.

Doc from org.eclipse.jetty.util.Index.getBest.

Get the best match from key in a String, which may be a prefix match or an exact match.

Parameters
s:String

The string

Returns:V

The value or null if not found

Annotations
@Override
getBestback to summary
public V getBest(byte[] b, int offset, int len)

Overrides org.eclipse.jetty.util.AbstractTrie.getBest.

Implements org.eclipse.jetty.util.Index.getBest.

Doc from org.eclipse.jetty.util.Index.getBest.

Get the best match from key in a byte array. The key is assumed to by ISO_8859_1 characters.

Parameters
b:byte[]

The buffer

offset:int

The offset within the array of the key

len:int

the length of the key

Returns:V

The value or null if not found

Annotations
@Override
getBestback to summary
public V getBest(ByteBuffer b)

Overrides default org.eclipse.jetty.util.Index.getBest.

Doc from org.eclipse.jetty.util.Index.getBest.

Get the best match from key in a byte buffer. The key is assumed to by ISO_8859_1 characters.

Parameters
b:ByteBuffer

The buffer

Returns:V

The value or null if not found

Annotations
@Override
getBestback to summary
public V getBest(byte[] b)

Overrides default org.eclipse.jetty.util.Index.getBest.

Doc from org.eclipse.jetty.util.Index.getBest.

Get the best match from key in a byte array. The key is assumed to by ISO_8859_1 characters.

Parameters
b:byte[]

The buffer

Returns:V

The value or null if not found

Annotations
@Override
getBestback to summary
public V getBest(String s, int offset, int len)

Implements org.eclipse.jetty.util.Index.getBest.

Doc from org.eclipse.jetty.util.Index.getBest.

Get the best match from key in a String.

Parameters
s:String

The string

offset:int

The offset within the string of the key

len:int

the length of the key

Returns:V

The value or null if not found

Annotations
@Override
getBestback to summary
public V getBest(ByteBuffer b, int offset, int len)

Implements org.eclipse.jetty.util.Index.getBest.

Doc from org.eclipse.jetty.util.Index.getBest.

Get the best match from key in a byte buffer. The key is assumed to by ISO_8859_1 characters.

Parameters
b:ByteBuffer

The buffer

offset:int

The offset within the buffer of the key

len:int

the length of the key

Returns:V

The value or null if not found

Annotations
@Override
instanceback to summary
public static <V> EmptyTrie<V> instance(boolean caseSensitive)
Annotations
@SuppressWarnings:unchecked
isEmptyback to summary
public boolean isEmpty()

Implements org.eclipse.jetty.util.Index.isEmpty.

Doc from org.eclipse.jetty.util.Index.isEmpty.

Check if the index contains any entry.

Returns:boolean

true if the index does not contain any entry.

Annotations
@Override
keySetback to summary
public Set<String> keySet()

Implements org.eclipse.jetty.util.Index.keySet.

Doc from org.eclipse.jetty.util.Index.keySet.

Get a Set of the keys contained in this index.

Returns:Set<String>

a Set of the keys contained in this index.

Annotations
@Override
putback to summary
public boolean put(V v)

Overrides org.eclipse.jetty.util.AbstractTrie.put.

Implements org.eclipse.jetty.util.Index.Mutable.put.

Doc from org.eclipse.jetty.util.Index.Mutable.put.

Put a value as both a key and a value.

Parameters
v:V

The value and key

Returns:boolean

True if the Trie had capacity to add the field.

Annotations
@Override
putback to summary
public boolean put(String s, V v)

Implements org.eclipse.jetty.util.Index.Mutable.put.

Doc from org.eclipse.jetty.util.Index.Mutable.put.

Put an entry into the index.

Parameters
s:String

The key for the entry. Must be non null, but can be empty.

v:V

The value of the entry. Must be non null.

Returns:boolean

True if the index had capacity to add the field.

Annotations
@Override
putAllback to summary
protected boolean putAll(Map<String, V> contents)

Overrides org.eclipse.jetty.util.AbstractTrie.putAll.

Annotations
@Override
sizeback to summary
public int size()

Implements org.eclipse.jetty.util.Index.size.

Doc from org.eclipse.jetty.util.Index.size.

Get the number of entries in the index.

Returns:int

the index' entries count.

Annotations
@Override