io.undertow.util

## Class SubstringMap<V>

- java.lang.Object
- - io.undertow.util.SubstringMap<V>

    public class SubstringMap<V>
    extends Object

A string keyed map that can be accessed as a substring, eliminating the need to allocate a new string to do a key comparison against.

This class uses linear probing and is thread safe due to copy on write semantics. As such it is not recomended for data that changes frequently.

This class does not actually implement the map interface to avoid implementing unnecessary operations.

Author:
  Stuart Douglas

### Nested Class Summary

Nested Classes
`static class` `SubstringMap.SubstringMatch<V>`

### Constructor Summary

Constructors
Constructor and Description
`SubstringMap()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `clear()`
`SubstringMap.SubstringMatch<V>` `get(String key)`
`SubstringMap.SubstringMatch<V>` `get(String key, int length)`
`Iterable<String>` `keys()`
`void` `put(String key, V value)`
`V` `remove(String key)`
`Map<String,V>` `toMap()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SubstringMap

    public SubstringMap()

### Method Detail

#### get

    public SubstringMap.SubstringMatch<V> get(String key,
                                              int length)

#### get

    public SubstringMap.SubstringMatch<V> get(String key)

#### put

    public void put(String key,
                    V value)

#### remove

    public V remove(String key)

#### toMap

    public Map<String,V> toMap()

#### clear

    public void clear()

#### keys

    public Iterable<String> keys()