Package net.apartium.cocoabeans.structs
Record Class MinecraftPlatform
java.lang.Object
java.lang.Record
net.apartium.cocoabeans.structs.MinecraftPlatform
- Record Components:
version- the Minecraft versionplatformName- the name of the platform (e.g., Spigot, Minestom)platformVersion- the version of the platform
@AvailableSince("0.0.46")
public record MinecraftPlatform(MinecraftVersion version, String platformName, String platformVersion)
extends Record
Represents a Minecraft platform, including its version, platform name, and platform version.
This record is used to encapsulate information about a specific Minecraft platform instance.
- Since:
- 0.0.46
-
Constructor Summary
ConstructorsConstructorDescriptionMinecraftPlatform(MinecraftVersion version, String platformName, String platformVersion) Creates an instance of aMinecraftPlatformrecord 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 theplatformNamerecord component.Returns the value of theplatformVersionrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Constructor Details
-
MinecraftPlatform
Creates an instance of aMinecraftPlatformrecord class.- Parameters:
version- the value for theversionrecord componentplatformName- the value for theplatformNamerecord componentplatformVersion- the value for theplatformVersionrecord component
-
-
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). -
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
platformName
Returns the value of theplatformNamerecord component.- Returns:
- the value of the
platformNamerecord component
-
platformVersion
Returns the value of theplatformVersionrecord component.- Returns:
- the value of the
platformVersionrecord component
-