Record Class Waypoint
java.lang.Object
java.lang.Record
com.zenith.feature.waypoints.Waypoint
- All Implemented Interfaces:
Comparable<Waypoint>
@NullMarked
public record Waypoint(String id, String dimension, int x, int y, int z)
extends Record
implements Comparable<Waypoint>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedimensionrecord component.@Nullable DimensionDatafinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.intz()Returns the value of thezrecord component.
-
Constructor Details
-
Waypoint
Creates an instance of aWaypointrecord class.- Parameters:
id- the value for theidrecord componentdimension- the value for thedimensionrecord componentx- the value for thexrecord componenty- the value for theyrecord componentz- the value for thezrecord component
-
-
Method Details
-
dimensionData
-
compareTo
- Specified by:
compareToin interfaceComparable<Waypoint>
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
dimension
Returns the value of thedimensionrecord component.- Returns:
- the value of the
dimensionrecord component
-
x
public int x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public int y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
z
public int z()Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-