Class ConfigPatternMap<T>
java.lang.Object
io.quarkus.deployment.configuration.matching.ConfigPatternMap<T>
- All Implemented Interfaces:
Iterable<T>
A pattern-matching mapping of configuration key pattern to value.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(String childName, ConfigPatternMap<T> child) (package private) booleanaddPattern(NameIterator nameIterator, T onMatch) booleanaddPattern(String pattern, T onMatch) Add a pattern to the map.iterator()match(NameIterator nameIterator) Find the item which matches the given configuration key iterator.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, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
WILD_CARD
- See Also:
-
-
Constructor Details
-
ConfigPatternMap
public ConfigPatternMap()
-
-
Method Details
-
match
Find the item which matches the given configuration key.- Parameters:
name- the configuration key (must not benull)- Returns:
- the matching item
-
match
Find the item which matches the given configuration key iterator.- Parameters:
nameIterator- the configuration key iterator (must not benull)- Returns:
- the matching item
-
matchLeaf
-
addPattern
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
-
getMatched
-
setMatched
-
childNames
-
getChild
-
iterator
-
addChild
-
merge
public static <T,U, ConfigPatternMap<R> mergeR> (ConfigPatternMap<T> param0, ConfigPatternMap<U> param1, BiFunction<T, U, R> combinator)
-