Record Class Padding
java.lang.Object
java.lang.Record
com.nsdev.lettergenerator.model.table.Padding
- Record Components:
topMm- space inside the top edgerightMm- space inside the right edgebottomMm- space inside the bottom edgeleftMm- space inside the left edge
Cell inner spacing, in millimeters. Each value must be finite and nonnegative at generation.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPadding(double topMm, double rightMm, double bottomMm, double leftMm) Creates an instance of aPaddingrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublebottomMm()Returns the value of thebottomMmrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleleftMm()Returns the value of theleftMmrecord component.doublerightMm()Returns the value of therightMmrecord component.doubletopMm()Returns the value of thetopMmrecord component.final StringtoString()Returns a string representation of this record class.static Paddinguniform(double millimeters) Creates equal padding on all edges, deferring range checks to generation.
-
Field Details
-
DEFAULT
Legacy one-millimeter padding on each edge. -
ZERO
Explicit zero padding on each edge.
-
-
Constructor Details
-
Padding
public Padding(double topMm, double rightMm, double bottomMm, double leftMm) Creates an instance of aPaddingrecord class.
-
-
Method Details
-
uniform
Creates equal padding on all edges, deferring range checks to generation.- Parameters:
millimeters- uniform inner spacing- Returns:
- immutable four-edge padding
-
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 with '=='. -
topMm
public double topMm()Returns the value of thetopMmrecord component.- Returns:
- the value of the
topMmrecord component
-
rightMm
public double rightMm()Returns the value of therightMmrecord component.- Returns:
- the value of the
rightMmrecord component
-
bottomMm
public double bottomMm()Returns the value of thebottomMmrecord component.- Returns:
- the value of the
bottomMmrecord component
-
leftMm
public double leftMm()Returns the value of theleftMmrecord component.- Returns:
- the value of the
leftMmrecord component
-