Class ConfigPatternMap<T>
- java.lang.Object
-
- io.quarkus.deployment.configuration.matching.ConfigPatternMap<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConfigPatternMap.PatternIterator<T>
-
Constructor Summary
Constructors Constructor Description ConfigPatternMap()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(String childName, ConfigPatternMap<T> child)(package private) booleanaddPattern(NameIterator nameIterator, T onMatch)booleanaddPattern(String pattern, T onMatch)Add a pattern to the map.Iterable<String>childNames()ConfigPatternMap<T>getChild(String name)TgetMatched()ConfigPatternMap.PatternIterator<T>iterator()Tmatch(NameIterator nameIterator)Find the item which matches the given configuration key iterator.Tmatch(String name)Find the item which matches the given configuration key.(package private) TmatchLeaf(NameIterator nameIterator)static <T,U,R>
ConfigPatternMap<R>merge(ConfigPatternMap<T> param0, ConfigPatternMap<U> param1, BiFunction<T,U,R> combinator)voidsetMatched(T matched)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
WILD_CARD
public static final String WILD_CARD
- See Also:
- Constant Field Values
-
-
Method Detail
-
match
public T match(String name)
Find the item which matches the given configuration key.- Parameters:
name- the configuration key (must not benull)- Returns:
- the matching item
-
match
public T match(NameIterator nameIterator)
Find the item which matches the given configuration key iterator.- Parameters:
nameIterator- the configuration key iterator (must not benull)- Returns:
- the matching item
-
matchLeaf
T matchLeaf(NameIterator nameIterator)
-
addPattern
public boolean addPattern(String pattern, T onMatch)
Add a pattern to the map. The segments of the pattern are dot-separated. The special segment name{*}will match any single segment name. The special segment name{**}will eagerly match any segment name sequence.- Parameters:
pattern- the pattern (must not benull)onMatch- the value to return when the pattern is matched (must not benull)- Returns:
trueif the pattern is a new unique pattern, or if the pattern exists but the given value is equal to the existing value;falseif the pattern exists but the given value is not equal to the existing value
-
addPattern
boolean addPattern(NameIterator nameIterator, T onMatch)
-
getMatched
public T getMatched()
-
setMatched
public void setMatched(T matched)
-
getChild
public ConfigPatternMap<T> getChild(String name)
-
iterator
public ConfigPatternMap.PatternIterator<T> iterator()
-
addChild
public void addChild(String childName, ConfigPatternMap<T> child)
-
merge
public static <T,U,R> ConfigPatternMap<R> merge(ConfigPatternMap<T> param0, ConfigPatternMap<U> param1, BiFunction<T,U,R> combinator)
-
-