Record Class FigureFrame

java.lang.Object
java.lang.Record
io.leandev.appfuse.report.chart.FigureFrame
Record Components:
id - 選填識別
width - 寬度
height - 高度
altText - 替代文字(Figure 必填)
caption - 圖說(Figure 必填)

public record FigureFrame(String id, Length width, Length height, String altText, List<Inline> caption) extends Record
圖表產生的 Figure 的識別、尺寸、替代文字與圖說
Since:
4.0.0
  • Constructor Details

    • FigureFrame

      public FigureFrame(String id, Length width, Length height, String altText, List<Inline> caption)
      Creates an instance of a FigureFrame record class.
      Parameters:
      id - the value for the id record component
      width - the value for the width record component
      height - the value for the height record component
      altText - the value for the altText record component
      caption - the value for the caption record component
  • Method Details

    • of

      public static FigureFrame of(String id, Length width, Length height)
    • altText

      public FigureFrame altText(String altText)
    • caption

      public FigureFrame caption(String caption)
    • caption

      public FigureFrame caption(List<Inline> caption)
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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
    • width

      public Length width()
      Returns the value of the width record component.
      Returns:
      the value of the width record component
    • height

      public Length height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component
    • altText

      public String altText()
      Returns the value of the altText record component.
      Returns:
      the value of the altText record component
    • caption

      public List<Inline> caption()
      Returns the value of the caption record component.
      Returns:
      the value of the caption record component