| Modifier and Type | Class and Description |
|---|---|
static class |
ConfigPatternMap.PatternIterator<T> |
| Constructor and Description |
|---|
ConfigPatternMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(String childName,
ConfigPatternMap<T> child) |
(package private) boolean |
addPattern(NameIterator nameIterator,
T onMatch) |
boolean |
addPattern(String pattern,
T onMatch)
Add a pattern to the map.
|
Iterable<String> |
childNames() |
ConfigPatternMap<T> |
getChild(String name) |
T |
getMatched() |
ConfigPatternMap.PatternIterator<T> |
iterator() |
T |
match(NameIterator nameIterator)
Find the item which matches the given configuration key iterator.
|
T |
match(String name)
Find the item which matches the given configuration key.
|
(package private) T |
matchLeaf(NameIterator nameIterator) |
static <T,U,R> ConfigPatternMap<R> |
merge(ConfigPatternMap<T> param0,
ConfigPatternMap<U> param1,
BiFunction<T,U,R> combinator) |
void |
setMatched(T matched) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic static final String WILD_CARD
public T match(String name)
name - the configuration key (must not be null)public T match(NameIterator nameIterator)
nameIterator - the configuration key iterator (must not be null)T matchLeaf(NameIterator nameIterator)
public boolean addPattern(String pattern, T onMatch)
{*} will match any single segment name.
The special segment name {**} will eagerly match any segment name sequence.pattern - the pattern (must not be null)onMatch - the value to return when the pattern is matched (must not be null)true if the pattern is a new unique pattern, or if the pattern exists but the given value
is equal to the existing value; false if the pattern exists but the given value is not equal to the
existing valueboolean addPattern(NameIterator nameIterator, T onMatch)
public T getMatched()
public void setMatched(T matched)
public ConfigPatternMap<T> getChild(String name)
public ConfigPatternMap.PatternIterator<T> iterator()
public void addChild(String childName, ConfigPatternMap<T> child)
public static <T,U,R> ConfigPatternMap<R> merge(ConfigPatternMap<T> param0, ConfigPatternMap<U> param1, BiFunction<T,U,R> combinator)
Copyright © 2020 JBoss by Red Hat. All rights reserved.