Record Class Section

java.lang.Object
java.lang.Record
io.leandev.appfuse.report.node.Section
Record Components:
id - 選填識別
title - 選填標題,供未來 PDF 書籤使用
blocks - 內容
pageBreakBefore - 是否在分節前換頁
summaryLastPage - 選填的本節最後內容頁摘要;須有文件 PageSummary,限非巢狀 Section
header - 分節每頁頁首;限頂層且 pageBreakBefore=true
footer - 分節每頁頁尾;限頂層且 pageBreakBefore=true
All Implemented Interfaces:
Block

public record Section(String id, String title, List<Block> blocks, boolean pageBreakBefore, PageSummaryOverride summaryLastPage, SectionPageRegion header, SectionPageRegion footer) extends Record implements Block
邏輯分節;本身不產生可見內容
Since:
4.0.0
  • Constructor Details

    • Section

      public Section(String id, String title, List<Block> blocks, boolean pageBreakBefore, PageSummaryOverride summaryLastPage)
      保留已發布的五參數建構器。
    • Section

      public Section(String id, String title, List<Block> blocks, boolean pageBreakBefore)
      相容既有四參數建構器;不設定分節摘要。
    • Section

      public Section(String id, String title, List<Block> blocks, boolean pageBreakBefore, PageSummaryOverride summaryLastPage, SectionPageRegion header, SectionPageRegion footer)
      Creates an instance of a Section record class.
      Parameters:
      id - the value for the id record component
      title - the value for the title record component
      blocks - the value for the blocks record component
      pageBreakBefore - the value for the pageBreakBefore record component
      summaryLastPage - the value for the summaryLastPage record component
      header - the value for the header record component
      footer - the value for the footer record component
  • Method Details

    • 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 String title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • blocks

      public List<Block> blocks()
      Returns the value of the blocks record component.
      Returns:
      the value of the blocks record component
    • pageBreakBefore

      public boolean pageBreakBefore()
      Returns the value of the pageBreakBefore record component.
      Returns:
      the value of the pageBreakBefore record component
    • summaryLastPage

      public PageSummaryOverride summaryLastPage()
      Returns the value of the summaryLastPage record component.
      Returns:
      the value of the summaryLastPage record component
    • header

      public SectionPageRegion header()
      Returns the value of the header record component.
      Returns:
      the value of the header record component
    • footer

      public SectionPageRegion footer()
      Returns the value of the footer record component.
      Returns:
      the value of the footer record component