Record Class ListItem
java.lang.Object
java.lang.Record
com.nsdev.lettergenerator.model.text.ListItem
- Record Components:
runs- owned inline content, required and nonempty during generationchildren- owned nested lists; null means no child lists
A list item's literal inline content followed by zero or more nested ordered/bulleted lists.
Child lists inherit the containing list's typography and indent relative to this item's body.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchildren()Returns the value of thechildrenrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.runs()Returns the value of therunsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ListItem
Snapshots both collections without validating text or nested list content.- Parameters:
runs- source inline runs, retaining null for path-aware validationchildren- source nested lists, or null for an empty list
-
-
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). -
runs
Returns the value of therunsrecord component.- Returns:
- the value of the
runsrecord component
-
children
Returns the value of thechildrenrecord component.- Returns:
- the value of the
childrenrecord component
-