Package dev.deepcore.challenge.preview
Record Class PreviewDisplayEntry
java.lang.Object
java.lang.Record
dev.deepcore.challenge.preview.PreviewDisplayEntry
public record PreviewDisplayEntry(UUID entityId, double relX, double relY, double relZ)
extends Record
Represents a tracked preview display entity and its relative coordinates.
-
Constructor Summary
ConstructorsConstructorDescriptionPreviewDisplayEntry(UUID entityId, double relX, double relY, double relZ) Creates an instance of aPreviewDisplayEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionentityId()Returns the value of theentityIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doublerelX()Returns the value of therelXrecord component.doublerelY()Returns the value of therelYrecord component.doublerelZ()Returns the value of therelZrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PreviewDisplayEntry
Creates an instance of aPreviewDisplayEntryrecord class.- Parameters:
entityId- the value for theentityIdrecord componentrelX- the value for therelXrecord componentrelY- the value for therelYrecord componentrelZ- the value for therelZrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
entityId
Returns the value of theentityIdrecord component.- Returns:
- the value of the
entityIdrecord component
-
relX
public double relX()Returns the value of therelXrecord component.- Returns:
- the value of the
relXrecord component
-
relY
public double relY()Returns the value of therelYrecord component.- Returns:
- the value of the
relYrecord component
-
relZ
public double relZ()Returns the value of therelZrecord component.- Returns:
- the value of the
relZrecord component
-