Record Class Library
java.lang.Object
java.lang.Record
net.fabricmc.loom.configuration.providers.minecraft.library.Library
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the value of theclassifierrecord component.final booleanIndicates whether some other object is "equal to" this one.static LibraryfromMaven(String name, Library.Target target) group()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.booleanReturns true when the group or the group and name match.name()Returns the value of thenamerecord component.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.withClassifier(@Nullable String classifier) withTarget(Library.Target target) withVersion(String version)
-
Constructor Details
-
Library
public Library(String group, String name, String version, @Nullable String classifier, Library.Target target) Creates an instance of aLibraryrecord class.- Parameters:
group- the value for thegrouprecord componentname- the value for thenamerecord componentversion- the value for theversionrecord componentclassifier- the value for theclassifierrecord componenttarget- the value for thetargetrecord component
-
-
Method Details
-
fromMaven
-
is
Returns true when the group or the group and name match.- Parameters:
str- Takes a string containing the maven group, or a group and name split by :- Returns:
- true when the group or the group and name match.
-
mavenNotation
-
withVersion
-
withClassifier
-
withTarget
-
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). -
group
Returns the value of thegrouprecord component.- Returns:
- the value of the
grouprecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
classifier
Returns the value of theclassifierrecord component.- Returns:
- the value of the
classifierrecord component
-
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-