Module pro.verron.officestamper
Package pro.verron.officestamper.core
Record Class StandardPlaceholder
java.lang.Object
java.lang.Record
pro.verron.officestamper.core.StandardPlaceholder
- All Implemented Interfaces:
Placeholder
public record StandardPlaceholder(pro.verron.officestamper.core.expression.Matcher matcher, String expression)
extends Record
implements Placeholder
Represents an expression with a configured Matcher.
-
Constructor Summary
ConstructorsConstructorDescriptionStandardPlaceholder(pro.verron.officestamper.core.expression.Matcher matcher, String expression) Creates an instance of aStandardPlaceholderrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the inner part of the expression by stripping the prefix and suffix.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpressionrecord component.final inthashCode()Returns a hash code value for this object.pro.verron.officestamper.core.expression.Matchermatcher()Returns the value of thematcherrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StandardPlaceholder
public StandardPlaceholder(pro.verron.officestamper.core.expression.Matcher matcher, String expression) Creates an instance of aStandardPlaceholderrecord class.- Parameters:
matcher- the value for thematcherrecord componentexpression- the value for theexpressionrecord component
-
-
Method Details
-
content
Returns the inner part of the expression by stripping the prefix and suffix.- Specified by:
contentin interfacePlaceholder- Returns:
- the inner part of the expression.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
matcher
public pro.verron.officestamper.core.expression.Matcher matcher()Returns the value of thematcherrecord component.- Returns:
- the value of the
matcherrecord component
-
expression
Returns the value of theexpressionrecord component.- Specified by:
expressionin interfacePlaceholder- Returns:
- the value of the
expressionrecord component
-