Record Class MjmlDocument
java.lang.Object
java.lang.Record
dev.jcputney.mjml.parser.MjmlDocument
- Record Components:
root- the root<mjml>node of the document
Represents an MJML document's structure, containing a root node and methods to access key
elements such as the head and body nodes. This class encapsulates the MJML document's logical
model, allowing for the retrieval of specific parts of its structure.
-
Constructor Summary
ConstructorsConstructorDescriptionMjmlDocument(MjmlNode root) Creates an instance of aMjmlDocumentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getBody()Returns the mj-body node, ornullif not present.getHead()Returns the mj-head node, ornullif not present.final inthashCode()Returns a hash code value for this object.root()Returns the root node of this document.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MjmlDocument
-
-
Method Details
-
root
-
getHead
Returns the mj-head node, ornullif not present.- Returns:
- the
<mj-head>node, ornull
-
getBody
Returns the mj-body node, ornullif not present.- Returns:
- the
<mj-body>node, ornull
-
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).
-