Package com.nsdev.lettergenerator.theme
Record Class Stationery
java.lang.Object
java.lang.Record
com.nsdev.lettergenerator.theme.Stationery
- Record Components:
elements- fixed top/bottom elements, defensively snapshottedtopZoneMm- reserved top height including the desired body gapbottomZoneMm- reserved bottom height including the desired body gap
public record Stationery(List<FixedElement> elements, double topZoneMm, double bottomZoneMm)
extends Record
Immutable header, footer and logo geometry shared by letters using a theme. Geometry is relative
to the inner page rectangle; choose the same paper and margins when authoring the stationery.
Letter-local regions with the same stable identifier replace inherited regions.
-
Constructor Summary
ConstructorsConstructorDescriptionStationery(List<FixedElement> elements, double topZoneMm, double bottomZoneMm) Snapshots registrations without validating geometry. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thebottomZoneMmrecord component.static StationeryBuilderbuilder()elements()Returns the value of theelementsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thetopZoneMmrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Stationery
Snapshots registrations without validating geometry.- Parameters:
elements- nullable fixed registrationstopZoneMm- reserved top zonebottomZoneMm- reserved bottom zone
-
-
Method Details
-
builder
- Returns:
- independent convenience builder using ordinary letter defaults
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
elements
Returns the value of theelementsrecord component.- Returns:
- the value of the
elementsrecord component
-
topZoneMm
public double topZoneMm()Returns the value of thetopZoneMmrecord component.- Returns:
- the value of the
topZoneMmrecord component
-
bottomZoneMm
public double bottomZoneMm()Returns the value of thebottomZoneMmrecord component.- Returns:
- the value of the
bottomZoneMmrecord component
-