Record Class GroupBlock
java.lang.Object
java.lang.Record
com.nsdev.lettergenerator.model.block.GroupBlock
- Record Components:
blocks- child blocks, snapshotted while preserving nulls for field-path validationstyle- nullable appearance and pagination overridesdefaultStyle- nullable typography fallback below theme and explicit overrides
- All Implemented Interfaces:
Block
public record GroupBlock(List<Block> blocks, Style style, Style defaultStyle)
extends Record
implements Block
Ordered content grouped under common typography and a soft page-keep preference. An explicit
keepTogether style overrides that preference. Group spacing applies around the container;
pagination controls remain local. Explicit AUTO groups in body flow may contain page breaks.
-
Constructor Summary
ConstructorsConstructorDescriptionGroupBlock(List<Block> blocks, Style style) Creates an ordinary group without fallback typography.GroupBlock(List<Block> blocks, Style style, Style defaultStyle) Snapshots the child list without checking its content or renderability. -
Method Summary
Modifier and TypeMethodDescriptionblocks()Returns the value of theblocksrecord component.Returns the value of thedefaultStylerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static GroupBlockCreates a group using inherited appearance and the ordinary soft keep.style()Returns the value of thestylerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GroupBlock
Creates an ordinary group without fallback typography.- Parameters:
blocks- ordered childrenstyle- optional explicit overrides
-
GroupBlock
Snapshots the child list without checking its content or renderability.- Parameters:
blocks- child blocks, or null for generation-time validationstyle- nullable group overridesdefaultStyle- optional fallback typography
-
-
Method Details
-
of
Creates a group using inherited appearance and the ordinary soft keep.- Parameters:
blocks- ordered child blocks- Returns:
- immutable group
-
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). -
blocks
Returns the value of theblocksrecord component.- Returns:
- the value of the
blocksrecord component
-
style
Returns the value of thestylerecord component. -
defaultStyle
Returns the value of thedefaultStylerecord component.- Returns:
- the value of the
defaultStylerecord component
-