Package com.nsdev.lettergenerator.letter
Record Class AddressLayout
java.lang.Object
java.lang.Record
com.nsdev.lettergenerator.letter.AddressLayout
- Record Components:
sender- sender rectangle, or null to keep sender in ordinary flowrecipient- recipient rectangle, or null to keep recipient in ordinary flowdate- date rectangle, or null to keep date in ordinary flowheightMm- panel height in millimeters
public record AddressLayout(Bounds sender, Bounds recipient, Bounds date, double heightMm)
extends Record
Optional freely positioned sender, recipient and date panel inside body flow. Bounds are relative
to the panel, not the physical paper; validation uses actual page width.
-
Constructor Summary
ConstructorsConstructorDescriptionAddressLayout(Bounds sender, Bounds recipient, Bounds date, double heightMm) Creates an instance of aAddressLayoutrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondate()Returns the value of thedaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleheightMm()Returns the value of theheightMmrecord component.Returns the value of therecipientrecord component.sender()Returns the value of thesenderrecord component.final StringtoString()Returns a string representation of this record class.static AddressLayoutSupplies an editable example window-envelope arrangement without postal compliance claims.
-
Constructor Details
-
Method Details
-
windowEnvelope
Supplies an editable example window-envelope arrangement without postal compliance claims.- Returns:
- a sender/recipient/date panel for ordinary A4 letter margins
-
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 '=='. -
sender
Returns the value of thesenderrecord component.- Returns:
- the value of the
senderrecord component
-
recipient
Returns the value of therecipientrecord component.- Returns:
- the value of the
recipientrecord component
-
date
Returns the value of thedaterecord component.- Returns:
- the value of the
daterecord component
-
heightMm
public double heightMm()Returns the value of theheightMmrecord component.- Returns:
- the value of the
heightMmrecord component
-