Record Class AsciiDocModel.Heading
java.lang.Object
java.lang.Record
pro.verron.officestamper.asciidoc.AsciiDocModel.Heading
- Record Components:
level- heading levelinlines- inline fragments
- All Implemented Interfaces:
AsciiDocModel.Block
- Enclosing class:
AsciiDocModel
public static record AsciiDocModel.Heading(List<String> header, int level, List<AsciiDocModel.Inline> inlines)
extends Record
implements AsciiDocModel.Block
Heading block (levels 1..6).
-
Constructor Summary
ConstructorsConstructorDescriptionHeading(int level, List<AsciiDocModel.Inline> inlines) Constructs a Heading object with the specified heading level and inline fragments.Heading(List<String> header, int level, List<AsciiDocModel.Inline> inlines) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.header()Returns the value of theheaderrecord component.inlines()Returns the value of theinlinesrecord component.intlevel()Returns the value of thelevelrecord component.intsize()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Heading
Constructs a Heading object with the specified heading level and inline fragments.- Parameters:
level- the heading level, must be between 1 and 6 (inclusive)inlines- the list of inline fragments representing the content of the heading- Throws:
IllegalArgumentException- if the heading level is outside the range of 1 to 6
-
Heading
Constructor.- Parameters:
level- heading levelinlines- inline fragments
-
-
Method Details
-
size
public int size()- Specified by:
sizein interfaceAsciiDocModel.Block
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
header
-
level
-
inlines
-