Interface IKeyPatternBuilder
public interface IKeyPatternBuilder
A builder for creating key patterns that a given
IKeyValueStore
implementation understands. Key pattern
builder instances can be obtained by calling IKeyValueStore.getKeyPatternBuilder()
.- Since:
- 11.0
- Author:
- Petru Galanton
-
Method Summary
Modifier and TypeMethodDescriptionAppends a pattern element which matches any character, once.Appends a pattern element which matches any string.build()
Builds a key pattern from the elements appended so far.Appends the given literal string to the pattern.pattern
(IKeyPattern pattern) Appends the given pattern.
-
Method Details
-
literal
Appends the given literal string to the pattern. Any special characters or wildcards are escaped.- Parameters:
value
- the literal value to append- Returns:
- this builder
-
anyString
IKeyPatternBuilder anyString()Appends a pattern element which matches any string.- Returns:
- this builder
-
anyCharacter
IKeyPatternBuilder anyCharacter()Appends a pattern element which matches any character, once.- Returns:
- this builder
-
pattern
Appends the given pattern.- Parameters:
pattern
- the pattern to append- Returns:
- this builder
-
build
IKeyPattern build()Builds a key pattern from the elements appended so far. After this method is called, the builder returns to its initial state and may be used to build new patterns from scratch.- Returns:
- the key pattern
-