Uses of Interface
org.apache.commons.text.matcher.StringMatcher
Packages that use StringMatcher
Package
Description
Basic classes for text handling.
StringSubstitutorReader
is a Reader
that performs string
substitution on a source Reader
using a StringSubstitutor
.
Provides algorithms for matching up strings for use with a
StringSubstitutor
.-
Uses of StringMatcher in org.apache.commons.text
Fields in org.apache.commons.text declared as StringMatcherModifier and TypeFieldDescriptionstatic final StringMatcher
StringSubstitutor.DEFAULT_PREFIX
Constant for the default variable prefix.static final StringMatcher
StringSubstitutor.DEFAULT_SUFFIX
Constant for the default variable suffix.static final StringMatcher
StringSubstitutor.DEFAULT_VALUE_DELIMITER
Constant for the default value delimiter of a variable.private StringMatcher
StringTokenizer.delimMatcher
The delimiter matcher.private StringMatcher
StringTokenizer.ignoredMatcher
The ignored matcher.private StringMatcher
StringSubstitutor.prefixMatcher
Stores the variable prefix.private StringMatcher
StringTokenizer.quoteMatcher
The quote matcher.private StringMatcher
StringSubstitutor.suffixMatcher
Stores the variable suffix.private StringMatcher
StringTokenizer.trimmerMatcher
The trimmer matcher.private StringMatcher
StringSubstitutor.valueDelimiterMatcher
Stores the default variable value delimiter.Methods in org.apache.commons.text that return StringMatcherModifier and TypeMethodDescriptionStringTokenizer.getDelimiterMatcher()
Gets the field delimiter matcher.StringTokenizer.getIgnoredMatcher()
Gets the ignored character matcher.StringTokenizer.getQuoteMatcher()
Gets the quote matcher currently in use.StringTokenizer.getTrimmerMatcher()
Gets the trimmer character matcher.StringSubstitutor.getValueDelimiterMatcher()
Gets the variable default value delimiter matcher currently in use.StringSubstitutor.getVariablePrefixMatcher()
Gets the variable prefix matcher currently in use.StringSubstitutor.getVariableSuffixMatcher()
Gets the variable suffix matcher currently in use.Methods in org.apache.commons.text with parameters of type StringMatcherModifier and TypeMethodDescriptionboolean
TextStringBuilder.contains
(StringMatcher matcher) Checks if the string builder contains a string matched using the specified matcher.TextStringBuilder.deleteAll
(StringMatcher matcher) Deletes all parts of the builder that the matcher matches.TextStringBuilder.deleteFirst
(StringMatcher matcher) Deletes the first match within the builder using the specified matcher.int
TextStringBuilder.indexOf
(StringMatcher matcher) Searches the string builder using the matcher to find the first match.int
TextStringBuilder.indexOf
(StringMatcher matcher, int startIndex) Searches the string builder using the matcher to find the first match searching from the given index.int
TextStringBuilder.lastIndexOf
(StringMatcher matcher) Searches the string builder using the matcher to find the last match.int
TextStringBuilder.lastIndexOf
(StringMatcher matcher, int startIndex) Searches the string builder using the matcher to find the last match searching from the given index.TextStringBuilder.replace
(StringMatcher matcher, String replaceStr, int startIndex, int endIndex, int replaceCount) Advanced search and replaces within the builder using a matcher.TextStringBuilder.replaceAll
(StringMatcher matcher, String replaceStr) Replaces all matches within the builder with the replace string.TextStringBuilder.replaceFirst
(StringMatcher matcher, String replaceStr) Replaces the first match within the builder with the replace string.private TextStringBuilder
TextStringBuilder.replaceImpl
(StringMatcher matcher, String replaceStr, int from, int to, int replaceCount) Replaces within the builder using a matcher.StringTokenizer.setDelimiterMatcher
(StringMatcher delim) Sets the field delimiter matcher.StringTokenizer.setIgnoredMatcher
(StringMatcher ignored) Set the matcher for characters to ignore.StringTokenizer.setQuoteMatcher
(StringMatcher quote) Set the quote matcher to use.StringTokenizer.setTrimmerMatcher
(StringMatcher trimmer) Sets the matcher for characters to trim.StringSubstitutor.setValueDelimiterMatcher
(StringMatcher valueDelimiterMatcher) Sets the variable default value delimiter matcher to use.StringSubstitutor.setVariablePrefixMatcher
(StringMatcher prefixMatcher) Sets the variable prefix matcher currently in use.StringSubstitutor.setVariableSuffixMatcher
(StringMatcher suffixMatcher) Sets the variable suffix matcher currently in use.Constructors in org.apache.commons.text with parameters of type StringMatcherModifierConstructorDescriptionStringSubstitutor
(StringLookup variableResolver, StringMatcher prefixMatcher, StringMatcher suffixMatcher, char escape) Creates a new instance and initializes it.StringSubstitutor
(StringLookup variableResolver, StringMatcher prefixMatcher, StringMatcher suffixMatcher, char escape, StringMatcher valueDelimiterMatcher) Creates a new instance and initializes it.StringTokenizer
(char[] input, StringMatcher delim) Constructs a tokenizer splitting using the specified delimiter matcher.StringTokenizer
(char[] input, StringMatcher delim, StringMatcher quote) Constructs a tokenizer splitting using the specified delimiter matcher and handling quotes using the specified quote matcher.StringTokenizer
(String input, StringMatcher delim) Constructs a tokenizer splitting using the specified delimiter matcher.StringTokenizer
(String input, StringMatcher delim, StringMatcher quote) Constructs a tokenizer splitting using the specified delimiter matcher and handling quotes using the specified quote matcher. -
Uses of StringMatcher in org.apache.commons.text.io
Fields in org.apache.commons.text.io declared as StringMatcherModifier and TypeFieldDescriptionprivate final StringMatcher
StringSubstitutorReader.prefixEscapeMatcher
Matches escaped variable starts.Methods in org.apache.commons.text.io with parameters of type StringMatcherModifier and TypeMethodDescriptionprivate boolean
StringSubstitutorReader.isBufferMatchAt
(StringMatcher stringMatcher, int pos) Tests if our buffer matches the given string matcher at the given position in the buffer. -
Uses of StringMatcher in org.apache.commons.text.matcher
Classes in org.apache.commons.text.matcher that implement StringMatcherModifier and TypeClassDescription(package private) class
A matcher that determines if a character array portion matches.(package private) static final class
Matches all of the given matchers in order.(package private) static final class
Matches out of a set of characters.(package private) static final class
Matches a character.(package private) static final class
Matches a set of characters.(package private) static final class
Matches nothing.(package private) static final class
Matches whitespace as per trim().Fields in org.apache.commons.text.matcher declared as StringMatcherModifier and TypeFieldDescriptionprivate final StringMatcher[]
AbstractStringMatcher.AndStringMatcher.stringMatchers
Matchers in order.Methods in org.apache.commons.text.matcher that return StringMatcherModifier and TypeMethodDescriptionStringMatcherFactory.andMatcher
(StringMatcher... stringMatchers) Creates a matcher that matches all of the given matchers in order.default StringMatcher
StringMatcher.andThen
(StringMatcher stringMatcher) Returns a matcher that matches this matcher followed by the given matcher.StringMatcherFactory.charMatcher
(char ch) Constructor that creates a matcher from a character.StringMatcherFactory.charSetMatcher
(char... chars) Constructor that creates a matcher from a set of characters.StringMatcherFactory.charSetMatcher
(String chars) Creates a matcher from a string representing a set of characters.StringMatcherFactory.commaMatcher()
Returns a matcher which matches the comma character.StringMatcherFactory.doubleQuoteMatcher()
Returns a matcher which matches the double quote character.StringMatcherFactory.noneMatcher()
Matches no characters.StringMatcherFactory.quoteMatcher()
Returns a matcher which matches the single or double quote character.StringMatcherFactory.singleQuoteMatcher()
Returns a matcher which matches the single quote character.StringMatcherFactory.spaceMatcher()
Returns a matcher which matches the space character.StringMatcherFactory.splitMatcher()
Matches the same characters as StringTokenizer, namely space, tab, newline and form feed.StringMatcherFactory.stringMatcher
(char... chars) Creates a matcher from a string.StringMatcherFactory.stringMatcher
(String str) Creates a matcher from a string.StringMatcherFactory.tabMatcher()
Returns a matcher which matches the tab character.StringMatcherFactory.trimMatcher()
Matches the String trim() whitespace characters.Methods in org.apache.commons.text.matcher with parameters of type StringMatcherModifier and TypeMethodDescriptionStringMatcherFactory.andMatcher
(StringMatcher... stringMatchers) Creates a matcher that matches all of the given matchers in order.default StringMatcher
StringMatcher.andThen
(StringMatcher stringMatcher) Returns a matcher that matches this matcher followed by the given matcher.Constructors in org.apache.commons.text.matcher with parameters of type StringMatcherModifierConstructorDescription(package private)
AndStringMatcher
(StringMatcher... stringMatchers) Constructs a new initialized instance.