Record Class PlaceholderFinder
java.lang.Object
java.lang.Record
pro.verron.officestamper.experimental.PlaceholderFinder
- Record Components:
pattern- the pattern to use for finding expressionsmatcher- the matcher to use for determining if an expression matches the specified prefix and suffix
The ExpressionFinder class is responsible for finding expressions in a given text based on a specified pattern and
matcher. It uses the Matcher class to determine if an expression matches the specified prefix and suffix, and the
Expression class to represent each found expression.
-
Constructor Summary
ConstructorsConstructorDescriptionPlaceholderFinder(Pattern pattern, Matcher matcher) Creates an instance of aPlaceholderFinderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Finds expressions in a given text based on a specified pattern and matcher.final inthashCode()Returns a hash code value for this object.matcher()Returns the value of thematcherrecord component.pattern()Returns the value of thepatternrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PlaceholderFinder
-
-
Method Details
-
find
Finds expressions in a given text based on a specified pattern and matcher.- Parameters:
text- the text to search for expressions- Returns:
- a list of found expressions
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
pattern
-
matcher
-