Uses of Interface
org.apache.commons.text.matcher.StringMatcher
-
Packages that use StringMatcher Package Description org.apache.commons.text Basic classes for text handling.org.apache.commons.text.io StringSubstitutorReader
is aReader
that performs string substitution on a sourceReader
using aStringSubstitutor
.org.apache.commons.text.matcher Provides algorithms for matching up strings for use with aStringSubstitutor
. -
-
Uses of StringMatcher in org.apache.commons.text
Fields in org.apache.commons.text declared as StringMatcher Modifier and Type Field Description static StringMatcher
StringSubstitutor. DEFAULT_PREFIX
Constant for the default variable prefix.static StringMatcher
StringSubstitutor. DEFAULT_SUFFIX
Constant for the default variable suffix.static 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 StringMatcher Modifier and Type Method Description StringMatcher
StringTokenizer. getDelimiterMatcher()
Gets the field delimiter matcher.StringMatcher
StringTokenizer. getIgnoredMatcher()
Gets the ignored character matcher.StringMatcher
StringTokenizer. getQuoteMatcher()
Gets the quote matcher currently in use.StringMatcher
StringTokenizer. getTrimmerMatcher()
Gets the trimmer character matcher.StringMatcher
StringSubstitutor. getValueDelimiterMatcher()
Gets the variable default value delimiter matcher currently in use.StringMatcher
StringSubstitutor. getVariablePrefixMatcher()
Gets the variable prefix matcher currently in use.StringMatcher
StringSubstitutor. getVariableSuffixMatcher()
Gets the variable suffix matcher currently in use.Methods in org.apache.commons.text with parameters of type StringMatcher Modifier and Type Method Description boolean
TextStringBuilder. contains(StringMatcher matcher)
Tests if the string builder contains a string matched using the specified matcher.TextStringBuilder
TextStringBuilder. deleteAll(StringMatcher matcher)
Deletes all parts of the builder that the matcher matches.TextStringBuilder
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
TextStringBuilder. replace(StringMatcher matcher, java.lang.String replaceStr, int startIndex, int endIndex, int replaceCount)
Advanced search and replaces within the builder using a matcher.TextStringBuilder
TextStringBuilder. replaceAll(StringMatcher matcher, java.lang.String replaceStr)
Replaces all matches within the builder with the replace string.TextStringBuilder
TextStringBuilder. replaceFirst(StringMatcher matcher, java.lang.String replaceStr)
Replaces the first match within the builder with the replace string.private TextStringBuilder
TextStringBuilder. replaceImpl(StringMatcher matcher, java.lang.String replaceStr, int from, int to, int replaceCount)
Replaces within the builder using a matcher.StringTokenizer
StringTokenizer. setDelimiterMatcher(StringMatcher delim)
Sets the field delimiter matcher.StringTokenizer
StringTokenizer. setIgnoredMatcher(StringMatcher ignored)
Sets the matcher for characters to ignore.StringTokenizer
StringTokenizer. setQuoteMatcher(StringMatcher quote)
Set the quote matcher to use.StringTokenizer
StringTokenizer. setTrimmerMatcher(StringMatcher trimmer)
Sets the matcher for characters to trim.StringSubstitutor
StringSubstitutor. setValueDelimiterMatcher(StringMatcher valueDelimiterMatcher)
Sets the variable default value delimiter matcher to use.StringSubstitutor
StringSubstitutor. setVariablePrefixMatcher(StringMatcher prefixMatcher)
Sets the variable prefix matcher currently in use.StringSubstitutor
StringSubstitutor. setVariableSuffixMatcher(StringMatcher suffixMatcher)
Sets the variable suffix matcher currently in use.Constructors in org.apache.commons.text with parameters of type StringMatcher Constructor Description StringSubstitutor(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(java.lang.String input, StringMatcher delim)
Constructs a tokenizer splitting using the specified delimiter matcher.StringTokenizer(java.lang.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 StringMatcher Modifier and Type Field Description private StringMatcher
StringSubstitutorReader. prefixEscapeMatcher
Matches escaped variable starts.Methods in org.apache.commons.text.io with parameters of type StringMatcher Modifier and Type Method Description private 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 StringMatcher Modifier and Type Class Description (package private) class
AbstractStringMatcher
A matcher that determines if a character array portion matches.(package private) static class
AbstractStringMatcher.AndStringMatcher
Matches all of the given matchers in order.(package private) static class
AbstractStringMatcher.CharArrayMatcher
Matches out of a set of characters.(package private) static class
AbstractStringMatcher.CharMatcher
Matches a character.(package private) static class
AbstractStringMatcher.CharSetMatcher
Matches a set of characters.(package private) static class
AbstractStringMatcher.NoneMatcher
Matches nothing.(package private) static class
AbstractStringMatcher.TrimMatcher
Matches whitespace as per trim().Fields in org.apache.commons.text.matcher declared as StringMatcher Modifier and Type Field Description private StringMatcher[]
AbstractStringMatcher.AndStringMatcher. stringMatchers
Matchers in order.Methods in org.apache.commons.text.matcher that return StringMatcher Modifier and Type Method Description StringMatcher
StringMatcherFactory. 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.StringMatcher
StringMatcherFactory. charMatcher(char ch)
Constructor that creates a matcher from a character.StringMatcher
StringMatcherFactory. charSetMatcher(char... chars)
Constructor that creates a matcher from a set of characters.StringMatcher
StringMatcherFactory. charSetMatcher(java.lang.String chars)
Creates a matcher from a string representing a set of characters.StringMatcher
StringMatcherFactory. commaMatcher()
Returns a matcher which matches the comma character.StringMatcher
StringMatcherFactory. doubleQuoteMatcher()
Returns a matcher which matches the double quote character.StringMatcher
StringMatcherFactory. noneMatcher()
Matches no characters.StringMatcher
StringMatcherFactory. quoteMatcher()
Returns a matcher which matches the single or double quote character.StringMatcher
StringMatcherFactory. singleQuoteMatcher()
Returns a matcher which matches the single quote character.StringMatcher
StringMatcherFactory. spaceMatcher()
Returns a matcher which matches the space character.StringMatcher
StringMatcherFactory. splitMatcher()
Matches the same characters as StringTokenizer, namely space, tab, newline and form feed.StringMatcher
StringMatcherFactory. stringMatcher(char... chars)
Creates a matcher from a string.StringMatcher
StringMatcherFactory. stringMatcher(java.lang.String str)
Creates a matcher from a string.StringMatcher
StringMatcherFactory. tabMatcher()
Returns a matcher which matches the tab character.StringMatcher
StringMatcherFactory. trimMatcher()
Matches the String trim() whitespace characters.Methods in org.apache.commons.text.matcher with parameters of type StringMatcher Modifier and Type Method Description StringMatcher
StringMatcherFactory. 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 StringMatcher Constructor Description AndStringMatcher(StringMatcher... stringMatchers)
Constructs a new initialized instance.
-