Record Class Column

java.lang.Object
java.lang.Record
io.leandev.appfuse.report.node.Column
Record Components:
id - 選填識別
title - 表頭內容
weight - 欄寬權重(有限正值),依比例分配表格寬度
align - 欄內段落的預設對齊
minWidth - 選填最小寬度

public record Column(String id, List<Inline> title, float weight, Align align, Length minWidth) extends Record
表格欄定義
Since:
4.0.0
  • Constructor Details

    • Column

      public Column(String id, List<Inline> title, float weight, Align align, Length minWidth)
      Creates an instance of a Column record class.
      Parameters:
      id - the value for the id record component
      title - the value for the title record component
      weight - the value for the weight record component
      align - the value for the align record component
      minWidth - the value for the minWidth record component
  • Method Details

    • of

      public static Column of(String id, String title, float weight, Align align)
      純文字表頭的欄
      Parameters:
      id - 識別
      title - 表頭文字
      weight - 欄寬權重
      align - 對齊
      Returns:
      欄定義
    • toString

      public final 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.
      Returns:
      the value of the id record component
    • title

      public List<Inline> title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • weight

      public float weight()
      Returns the value of the weight record component.
      Returns:
      the value of the weight record component
    • align

      public Align align()
      Returns the value of the align record component.
      Returns:
      the value of the align record component
    • minWidth

      public Length minWidth()
      Returns the value of the minWidth record component.
      Returns:
      the value of the minWidth record component