T - valuepublic class PathTrie<T> extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
PathTrie.Decoder |
class |
PathTrie.TrieNode |
| 构造器和说明 |
|---|
PathTrie(PathTrie.Decoder decoder) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
insert(String path,
T value) |
void |
insertOrUpdate(String path,
T value,
BiFunction<T,T,T> updater)
Insert a value for the given path.
|
T |
retrieve(String path) |
T |
retrieve(String path,
Map<String,String> params) |
T |
retrieve(String path,
Map<String,String> params,
cn.sliew.milky.common.path.PathTrie.TrieMatchingMode trieMatchingMode) |
Iterator<T> |
retrieveAll(String path,
Supplier<Map<String,String>> paramSupplier)
Returns an iterator of the objects stored in the
PathTrie, using
all possible TrieMatchingMode modes. |
public PathTrie(PathTrie.Decoder decoder)
public void insertOrUpdate(String path, T value, BiFunction<T,T,T> updater)
value = updater.apply(oldValue, newValue);allowing the value to be updated if desired.
public T retrieve(String path, Map<String,String> params, cn.sliew.milky.common.path.PathTrie.TrieMatchingMode trieMatchingMode)
Copyright © 2021. All rights reserved.