Package com.nsdev.lettergenerator.model
Record Class DocumentSettings
java.lang.Object
java.lang.Record
com.nsdev.lettergenerator.model.DocumentSettings
- Record Components:
locale- country-aware formatting, null selects stable defaultsmetadata- optional PDF metadatadirection- optional explicit direction; null retains ordinary left-to-right behaviorfallbackFonts- ordered registered family names, null becomes emptyhyphenate- whether registered language patterns should be used, null means false
public record DocumentSettings(LocaleSettings locale, DocumentMetadata metadata, TextDirection direction, List<String> fallbackFonts, Boolean hyphenate)
extends Record
Optional language, formatting, metadata and explicit font fallback settings. No system-font
scanning or JVM default locale/time zone participates.
-
Constructor Summary
ConstructorsConstructorDescriptionDocumentSettings(LocaleSettings locale, DocumentMetadata metadata, TextDirection direction, List<String> fallbackFonts, Boolean hyphenate) Snapshots options and supplies deterministic formatting defaults. -
Method Summary
Modifier and TypeMethodDescriptionstatic DocumentSettingsdefaults()Returns the value of thedirectionrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefallbackFontsrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thehyphenaterecord component.locale()Returns the value of thelocalerecord component.metadata()Returns the value of themetadatarecord component.final StringtoString()Returns a string representation of this record class.withLocale(LocaleSettings value) Returns a copy with country-aware formatting replaced.
-
Constructor Details
-
DocumentSettings
public DocumentSettings(LocaleSettings locale, DocumentMetadata metadata, TextDirection direction, List<String> fallbackFonts, Boolean hyphenate) Snapshots options and supplies deterministic formatting defaults.- Parameters:
locale- optional formatting settingsmetadata- optional PDF metadatadirection- optional writing directionfallbackFonts- optional ordered fallback familieshyphenate- optional dictionary-based hyphenation
-
-
Method Details
-
defaults
- Returns:
- defaults that preserve ordinary letter output
-
withLocale
Returns a copy with country-aware formatting replaced.- Parameters:
value- new formatting settings- Returns:
- immutable settings
-
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). -
locale
Returns the value of thelocalerecord component.- Returns:
- the value of the
localerecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-
direction
Returns the value of thedirectionrecord component.- Returns:
- the value of the
directionrecord component
-
fallbackFonts
Returns the value of thefallbackFontsrecord component.- Returns:
- the value of the
fallbackFontsrecord component
-
hyphenate
Returns the value of thehyphenaterecord component.- Returns:
- the value of the
hyphenaterecord component
-