java.lang.Object
java.lang.Record
com.renomad.minum.templating.RenderingResult
- Record Components:
renderedSection
- The result of rendering this section. In the case of aTemplateSection
that takes a key, this will be the result of replacing that with what the user provided.appliedKey
- In cases where a key was replaced with a value supplied by the user, this will supply the key that was replaced. This is useful to track how the supplied keys are being used in the template.
The result of rendering one of the
TemplateSection
s, used to build
up the full template. This is needed so we obtain information about whether our
user-supplied keys were applied.-
Constructor Summary
ConstructorDescriptionRenderingResult
(String renderedSection, String appliedKey) Creates an instance of aRenderingResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theappliedKey
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 therenderedSection
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
RenderingResult
Creates an instance of aRenderingResult
record class.- Parameters:
renderedSection
- the value for therenderedSection
record componentappliedKey
- the value for theappliedKey
record component
-
-
Method Details
-
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)
. -
renderedSection
Returns the value of therenderedSection
record component.- Returns:
- the value of the
renderedSection
record component
-
appliedKey
Returns the value of theappliedKey
record component.- Returns:
- the value of the
appliedKey
record component
-