Record Class SandboxMetadata.V1
java.lang.Object
java.lang.Record
net.fabricmc.loom.configuration.sandbox.SandboxMetadata.V1
- All Implemented Interfaces:
SandboxMetadata
- Enclosing interface:
SandboxMetadata
public static record SandboxMetadata.V1(String mainClass, Map<SandboxMetadata.OperatingSystem,List<SandboxMetadata.Architecture>> supportedPlatforms)
extends Record
implements SandboxMetadata
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.fabricmc.loom.configuration.sandbox.SandboxMetadata
SandboxMetadata.Architecture, SandboxMetadata.OperatingSystem, SandboxMetadata.V1 -
Field Summary
Fields inherited from interface net.fabricmc.loom.configuration.sandbox.SandboxMetadata
SANDBOX_METADATA_FILENAME -
Constructor Summary
ConstructorsConstructorDescriptionV1(String mainClass, Map<SandboxMetadata.OperatingSystem, List<SandboxMetadata.Architecture>> supportedPlatforms) Creates an instance of aV1record 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.Returns the value of themainClassrecord component.Returns the value of thesupportedPlatformsrecord component.booleansupportsPlatform(Platform platform) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
V1
public V1(String mainClass, Map<SandboxMetadata.OperatingSystem, List<SandboxMetadata.Architecture>> supportedPlatforms) Creates an instance of aV1record class.- Parameters:
mainClass- the value for themainClassrecord componentsupportedPlatforms- the value for thesupportedPlatformsrecord component
-
-
Method Details
-
supportsPlatform
- Specified by:
supportsPlatformin interfaceSandboxMetadata- Parameters:
platform- The platform to check.- Returns:
- True if the sandbox supports the platform, false otherwise.
-
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). -
mainClass
Returns the value of themainClassrecord component.- Specified by:
mainClassin interfaceSandboxMetadata- Returns:
- the value of the
mainClassrecord component
-
supportedPlatforms
Returns the value of thesupportedPlatformsrecord component.- Returns:
- the value of the
supportedPlatformsrecord component
-