Record Class SharedUtil.SimpleModuleVersionIdentifier

java.lang.Object
java.lang.Record
net.minecraftforge.gradleutils.shared.SharedUtil.SimpleModuleVersionIdentifier
All Implemented Interfaces:
Serializable, org.gradle.api.artifacts.ModuleVersionIdentifier
Enclosing class:
SharedUtil

public static record SharedUtil.SimpleModuleVersionIdentifier(org.gradle.api.artifacts.ModuleIdentifier getModule, String getVersion, @Nullable String classifier, String extension) extends Record implements org.gradle.api.artifacts.ModuleVersionIdentifier
See Also:
  • Constructor Details

    • SimpleModuleVersionIdentifier

      public SimpleModuleVersionIdentifier(org.gradle.api.artifacts.ModuleIdentifier getModule, String getVersion, @Nullable @Nullable String classifier, String extension)
      Creates an instance of a SimpleModuleVersionIdentifier record class.
      Parameters:
      getModule - the value for the getModule record component
      getVersion - the value for the getVersion record component
      classifier - the value for the classifier record component
      extension - the value for the extension record component
  • Method Details

    • getGroup

      public String getGroup()
      Specified by:
      getGroup in interface org.gradle.api.artifacts.ModuleVersionIdentifier
    • getName

      public String getName()
      Specified by:
      getName in interface org.gradle.api.artifacts.ModuleVersionIdentifier
    • getDownloadUrl

      public String getDownloadUrl(String prefix)
    • getFileName

      public String getFileName()
    • withVersion

      public SharedUtil.SimpleModuleVersionIdentifier withVersion(String version)
    • withClassifier

      public SharedUtil.SimpleModuleVersionIdentifier withClassifier(String classifier)
    • withExtension

      public SharedUtil.SimpleModuleVersionIdentifier withExtension(String extension)
    • toString

      public 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.
    • getModule

      public org.gradle.api.artifacts.ModuleIdentifier getModule()
      Returns the value of the getModule record component.
      Specified by:
      getModule in interface org.gradle.api.artifacts.ModuleVersionIdentifier
      Returns:
      the value of the getModule record component
    • getVersion

      public String getVersion()
      Returns the value of the getVersion record component.
      Specified by:
      getVersion in interface org.gradle.api.artifacts.ModuleVersionIdentifier
      Returns:
      the value of the getVersion record component
    • classifier

      @Nullable public @Nullable String classifier()
      Returns the value of the classifier record component.
      Returns:
      the value of the classifier record component
    • extension

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