Record Class FixedDocument.Barcode

java.lang.Object
java.lang.Record
io.leandev.appfuse.pdf.FixedDocument.Barcode
All Implemented Interfaces:
FixedDocument.Element
Enclosing class:
FixedDocument

public static record FixedDocument.Barcode(String id, FixedDocument.Layer layer, double x, double y, FixedDocument.BarcodeType type, String payload, double moduleMm, double heightMm, int quietModules) extends Record implements FixedDocument.Element
黑白向量條碼。moduleMm 不縮放;一維碼 heightMm 為條高,QR 高度由模組數決定。 quietModules 為每側靜區,QR 至少 4、一維碼至少 10。payload 的業務檢查碼由應用提供。 不自動加入人眼可讀文字,需另建 Text。
Since:
4.0.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    Barcode(String id, FixedDocument.Layer layer, double x, double y, FixedDocument.BarcodeType type, String payload, double moduleMm, double heightMm, int quietModules)
    Creates an instance of a Barcode record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    double
    Returns the value of the heightMm record component.
    id()
    Returns the value of the id record component.
    Returns the value of the layer record component.
    double
    Returns the value of the moduleMm record component.
    Returns the value of the payload record component.
    int
    Returns the value of the quietModules record component.
    Returns a string representation of this record class.
    Returns the value of the type record component.
    double
    x()
    Returns the value of the x record component.
    double
    y()
    Returns the value of the y record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Barcode

      public Barcode(String id, FixedDocument.Layer layer, double x, double y, FixedDocument.BarcodeType type, String payload, double moduleMm, double heightMm, int quietModules)
      Creates an instance of a Barcode record class.
      Parameters:
      id - the value for the id record component
      layer - the value for the layer record component
      x - the value for the x record component
      y - the value for the y record component
      type - the value for the type record component
      payload - the value for the payload record component
      moduleMm - the value for the moduleMm record component
      heightMm - the value for the heightMm record component
      quietModules - the value for the quietModules record component
  • Method Details

    • toString

      public String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Specified by:
      id in interface FixedDocument.Element
      Returns:
      the value of the id record component
    • layer

      public FixedDocument.Layer layer()
      Returns the value of the layer record component.
      Specified by:
      layer in interface FixedDocument.Element
      Returns:
      the value of the layer record component
    • x

      public double x()
      Returns the value of the x record component.
      Returns:
      the value of the x record component
    • y

      public double y()
      Returns the value of the y record component.
      Returns:
      the value of the y record component
    • type

      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • payload

      public String payload()
      Returns the value of the payload record component.
      Returns:
      the value of the payload record component
    • moduleMm

      public double moduleMm()
      Returns the value of the moduleMm record component.
      Returns:
      the value of the moduleMm record component
    • heightMm

      public double heightMm()
      Returns the value of the heightMm record component.
      Returns:
      the value of the heightMm record component
    • quietModules

      public int quietModules()
      Returns the value of the quietModules record component.
      Returns:
      the value of the quietModules record component