Record Class ProcessorContext
java.lang.Object
java.lang.Record
pro.verron.officestamper.api.ProcessorContext
- Record Components:
paragraph
- The paragraph associated with this context.run
- The run object representing a run of text.comment
- The comment associated with this context.placeholder
- The placeholder being processed in this context.
public record ProcessorContext(Paragraph paragraph, org.docx4j.wml.R run, Comment comment, Placeholder placeholder)
extends Record
Represents the context in which a processor operates in a text document.
Contains information about the paragraph, run, comment, and placeholder being processed.
-
Constructor Summary
ConstructorsConstructorDescriptionProcessorContext
(Paragraph paragraph, org.docx4j.wml.R run, Comment comment, Placeholder placeholder) Creates an instance of aProcessorContext
record class. -
Method Summary
Modifier and TypeMethodDescriptioncomment()
Returns the value of thecomment
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theparagraph
record component.Returns the value of theplaceholder
record component.org.docx4j.wml.R
run()
Returns the value of therun
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ProcessorContext
public ProcessorContext(Paragraph paragraph, org.docx4j.wml.R run, Comment comment, Placeholder placeholder) Creates an instance of aProcessorContext
record class.- Parameters:
paragraph
- the value for theparagraph
record componentrun
- the value for therun
record componentcomment
- the value for thecomment
record componentplaceholder
- the value for theplaceholder
record component
-
-
Method Details
-
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)
. -
paragraph
-
run
-
comment
-
placeholder
Returns the value of theplaceholder
record component.- Returns:
- the value of the
placeholder
record component
-