Record Class DiscoPackage

java.lang.Object
java.lang.Record
com.dua3.gradle.jdkprovider.types.DiscoPackage
Record Components:
downloadUri - the URI from which the package can be downloaded
sha256 - the SHA-256 checksum of the package, useful for verifying file integrity
distribution - the name of the distribution or source associated with the package
archiveType - the type of archive (e.g., "zip", "tar.gz") that the package is stored in
filename - the filename of the package as it would appear when downloaded
version - the version specification of the package
os - the operating system family for which this package is designed
architecture - the system architecture that this package is compatible with
libcType - the type of C library (e.g., "musl", "glibc") that the package is compatible with

public record DiscoPackage(URI downloadUri, String sha256, String distribution, String archiveType, String filename, Runtime.Version version, OSFamily os, SystemArchitecture architecture, String libcType) extends Record
Represents a package containing information about a downloadable asset, such as its URI, checksum, distribution details, archive type, and compatibility with a specific operating system and architecture.

Instances of this record can be used to encapsulate metadata for software packages or other distributable artifacts.

  • Constructor Details

    • DiscoPackage

      public DiscoPackage(URI downloadUri, String sha256, String distribution, String archiveType, String filename, Runtime.Version version, OSFamily os, SystemArchitecture architecture, String libcType)
      Creates an instance of a DiscoPackage record class.
      Parameters:
      downloadUri - the value for the downloadUri record component
      sha256 - the value for the sha256 record component
      distribution - the value for the distribution record component
      archiveType - the value for the archiveType record component
      filename - the value for the filename record component
      version - the value for the version record component
      os - the value for the os record component
      architecture - the value for the architecture record component
      libcType - the value for the libcType 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. 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.
    • downloadUri

      public URI downloadUri()
      Returns the value of the downloadUri record component.
      Returns:
      the value of the downloadUri record component
    • sha256

      public String sha256()
      Returns the value of the sha256 record component.
      Returns:
      the value of the sha256 record component
    • distribution

      public String distribution()
      Returns the value of the distribution record component.
      Returns:
      the value of the distribution record component
    • archiveType

      public String archiveType()
      Returns the value of the archiveType record component.
      Returns:
      the value of the archiveType record component
    • filename

      public String filename()
      Returns the value of the filename record component.
      Returns:
      the value of the filename record component
    • version

      public Runtime.Version version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • os

      public OSFamily os()
      Returns the value of the os record component.
      Returns:
      the value of the os record component
    • architecture

      public SystemArchitecture architecture()
      Returns the value of the architecture record component.
      Returns:
      the value of the architecture record component
    • libcType

      public String libcType()
      Returns the value of the libcType record component.
      Returns:
      the value of the libcType record component