Record Class VanillaVersion
java.lang.Object
java.lang.Record
net.rebel459.unified.api.util.VanillaVersion
- All Implemented Interfaces:
Comparable<VanillaVersion>
public record VanillaVersion(int year, int drop, int patch)
extends Record
implements Comparable<VanillaVersion>
-
Constructor Summary
ConstructorsConstructorDescriptionVanillaVersion(int year, int drop, int patch) Creates an instance of aVanillaVersionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(VanillaVersion other) intdrop()Returns the value of thedroprecord component.final booleanIndicates whether some other object is "equal to" this one.static VanillaVersionfinal inthashCode()Returns a hash code value for this object.static VanillaVersionintpatch()Returns the value of thepatchrecord component.toString()Returns a string representation of this record class.intyear()Returns the value of theyearrecord component.
-
Constructor Details
-
VanillaVersion
public VanillaVersion(int year, int drop, int patch) Creates an instance of aVanillaVersionrecord class.- Parameters:
year- the value for theyearrecord componentdrop- the value for thedroprecord componentpatch- the value for thepatchrecord component
-
-
Method Details
-
parse
-
getVanillaVersion
-
compareTo
- Specified by:
compareToin interfaceComparable<VanillaVersion>
-
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
year
public int year()Returns the value of theyearrecord component.- Returns:
- the value of the
yearrecord component
-
drop
public int drop()Returns the value of thedroprecord component.- Returns:
- the value of the
droprecord component
-
patch
public int patch()Returns the value of thepatchrecord component.- Returns:
- the value of the
patchrecord component
-