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
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.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) 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) 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 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:
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 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)
-