java.lang.Object
java.lang.Record
ovh.paulem.modrinthapi.types.version.VersionDependency
public record VersionDependency(@Nullable String versionId, @Nullable String projectId, @Nullable String fileName, @NotNull DependencyType dependencyType)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionVersionDependency(@Nullable String versionId, @Nullable String projectId, @Nullable String fileName, @NotNull DependencyType dependencyType) Creates an instance of aVersionDependencyrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull DependencyTypeReturns the value of thedependencyTyperecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable StringfileName()Returns the value of thefileNamerecord component.static VersionDependencyfromJson(com.google.gson.JsonElement json) final inthashCode()Returns a hash code value for this object.@Nullable StringReturns the value of theprojectIdrecord component.final StringtoString()Returns a string representation of this record class.@Nullable StringReturns the value of theversionIdrecord component.
-
Constructor Details
-
VersionDependency
public VersionDependency(@Nullable @Nullable String versionId, @Nullable @Nullable String projectId, @Nullable @Nullable String fileName, @NotNull @NotNull DependencyType dependencyType) Creates an instance of aVersionDependencyrecord class.- Parameters:
versionId- the value for theversionIdrecord componentprojectId- the value for theprojectIdrecord componentfileName- the value for thefileNamerecord componentdependencyType- the value for thedependencyTyperecord component
-
-
Method Details
-
fromJson
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
versionId
Returns the value of theversionIdrecord component.- Returns:
- the value of the
versionIdrecord component
-
projectId
Returns the value of theprojectIdrecord component.- Returns:
- the value of the
projectIdrecord component
-
fileName
Returns the value of thefileNamerecord component.- Returns:
- the value of the
fileNamerecord component
-
dependencyType
Returns the value of thedependencyTyperecord component.- Returns:
- the value of the
dependencyTyperecord component
-