Record Class WorldPosition
java.lang.Object
java.lang.Record
eu.cloudnetservice.modules.bridge.WorldPosition
- Record Components:
x- the x coordinate of the position.y- the y coordinate of the position.z- the z coordinate of the position.yaw- the yaw of the position.pitch- the pitch of the position.world- the world this position is located on.group- the group this position is created for.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TypeThe field for thegrouprecord component.private final doubleThe field for thepitchrecord component.The field for theworldrecord component.private final doubleThe field for thexrecord component.private final doubleThe field for theyrecord component.private final doubleThe field for theyawrecord component.private final doubleThe field for thezrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionWorldPosition(double x, double y, double z, double yaw, double pitch, @NonNull String world, @Nullable String group) Creates an instance of aWorldPositionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.group()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.doublepitch()Returns the value of thepitchrecord component.final StringtoString()Returns a string representation of this record class.world()Returns the value of theworldrecord component.doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.doubleyaw()Returns the value of theyawrecord component.doublez()Returns the value of thezrecord component.
-
Field Details
-
x
private final double xThe field for thexrecord component. -
y
private final double yThe field for theyrecord component. -
z
private final double zThe field for thezrecord component. -
yaw
private final double yawThe field for theyawrecord component. -
pitch
private final double pitchThe field for thepitchrecord component. -
world
-
group
-
COL_TYPE
-
-
Constructor Details
-
WorldPosition
public WorldPosition(double x, double y, double z, double yaw, double pitch, @NonNull @NonNull String world, @Nullable @Nullable String group) Creates an instance of aWorldPositionrecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentz- the value for thezrecord componentyaw- the value for theyawrecord componentpitch- the value for thepitchrecord componentworld- the value for theworldrecord componentgroup- the value for thegrouprecord component
-
-
Method Details
-
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. -
x
-
y
-
z
-
yaw
-
pitch
-
world
-
group
-