Record Class HudLink
java.lang.Object
java.lang.Record
dev.boze.api.gui.hud.HudLink
- Record Components:
target- The target's title, or its stored name while it is missingactive- Whether the element is following the target right nowfromX- The attached point of this elementfromY- The attached point of this elementtoX- The point it is attached to, the same asfromXwhile not activetoY- The point it is attached to, the same asfromYwhile not active
public record HudLink(String target, boolean active, double fromX, double fromY, double toX, double toY)
extends Record
An element's attachment to another element, in GUI-scaled pixels. While the target is off or
missing, the element stays at its own screen anchor and keeps the link for when the target returns.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanactive()Returns the value of theactiverecord component.final booleanIndicates whether some other object is "equal to" this one.doublefromX()Returns the value of thefromXrecord component.doublefromY()Returns the value of thefromYrecord component.final inthashCode()Returns a hash code value for this object.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.doubletoX()Returns the value of thetoXrecord component.doubletoY()Returns the value of thetoYrecord component.
-
Constructor Details
-
HudLink
Creates an instance of aHudLinkrecord class.- Parameters:
target- the value for thetargetrecord componentactive- the value for theactiverecord componentfromX- the value for thefromXrecord componentfromY- the value for thefromYrecord componenttoX- the value for thetoXrecord componenttoY- the value for thetoYrecord 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. -
target
-
active
-
fromX
-
fromY
-
toX
-
toY
-