Record Class ResponsiveBuilder.GenerateResult

java.lang.Object
java.lang.Record
cloud.opencode.base.image.responsive.ResponsiveBuilder.GenerateResult
Record Components:
path - the output file path | 输出文件路径
variant - the variant that was generated | 生成的变体
format - the image format used | 使用的图片格式
fileSize - the file size in bytes | 文件大小(字节)
Enclosing class:
ResponsiveBuilder

public static record ResponsiveBuilder.GenerateResult(Path path, ResponsiveBuilder.Variant variant, ImageFormat format, long fileSize) extends Record
Result of a single variant generation, containing the output path, variant info, format, and file size. 单个变体生成的结果,包含输出路径、变体信息、格式和文件大小。
Since:
JDK 25, opencode-base-image V2.0.0
Author:
Leon Soo www.LeonSoo.com
  • Constructor Details

  • 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.
    • path

      public Path path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • variant

      public ResponsiveBuilder.Variant variant()
      Returns the value of the variant record component.
      Returns:
      the value of the variant record component
    • format

      public ImageFormat format()
      Returns the value of the format record component.
      Returns:
      the value of the format record component
    • fileSize

      public long fileSize()
      Returns the value of the fileSize record component.
      Returns:
      the value of the fileSize record component