Package net.fabricmc.loom.spec
Record Class EnvironmentSpec.LoaderSpec
java.lang.Object
java.lang.Record
net.fabricmc.loom.spec.EnvironmentSpec.LoaderSpec
- Record Components:
platform- 平台标识(fabric / forge / neoforge / quilt)version- 加载器版本;无加载器概念的平台为空
- All Implemented Interfaces:
Serializable
- Enclosing class:
EnvironmentSpec
public static record EnvironmentSpec.LoaderSpec(String platform, @Nullable String version)
extends Record
implements Serializable
加载器规格.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLoaderSpec(String platform, @Nullable String version) Creates an instance of aLoaderSpecrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.platform()Returns the value of theplatformrecord component.final StringtoString()Returns a string representation of this record class.@Nullable Stringversion()Returns the value of theversionrecord component.
-
Constructor Details
-
Method Details
-
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). -
platform
Returns the value of theplatformrecord component.- Returns:
- the value of the
platformrecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-