Record Class Matcher
java.lang.Object
java.lang.Record
pro.verron.officestamper.core.Matcher
- Record Components:
prefix- the prefix to match.suffix- the suffix to match.
The Matcher class provides methods to match and strip expressions based on a specified prefix and suffix.
The match() method checks if an expression starts with the prefix
and ends with the suffix.
The strip() method removes the prefix and suffix from an expression
and returns the inner part.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanChecks if the given expression matches the specified criteria.prefix()Returns the value of theprefixrecord component.Strips the prefix and suffix from the given expression and returns the inner part.suffix()Returns the value of thesuffixrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Matcher
-
-
Method Details
-
match
Checks if the given expression matches the specified criteria.- Parameters:
expression- the expression to be matched.- Returns:
trueif the expression starts with the prefix and ends with the suffix,falseotherwise.
-
strip
-
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). -
prefix
-
suffix
-