Record Class MinimapPanel.Line
java.lang.Object
java.lang.Record
megamek.client.ui.dialogs.minimap.MinimapPanel.Line
- Enclosing class:
MinimapPanel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intround()Returns the value of theroundrecord component.final StringtoString()Returns a string representation of this record class.intx1()Returns the value of thex1record component.intx2()Returns the value of thex2record component.inty1()Returns the value of they1record component.inty2()Returns the value of they2record component.
-
Constructor Details
-
Line
Creates an instance of aLinerecord class.- Parameters:
x1- the value for thex1record componenty1- the value for they1record componentx2- the value for thex2record componenty2- the value for they2record componentcolor- the value for thecolorrecord componentround- the value for theroundrecord 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 '=='. -
x1
public int x1()Returns the value of thex1record component.- Returns:
- the value of the
x1record component
-
y1
public int y1()Returns the value of they1record component.- Returns:
- the value of the
y1record component
-
x2
public int x2()Returns the value of thex2record component.- Returns:
- the value of the
x2record component
-
y2
public int y2()Returns the value of they2record component.- Returns:
- the value of the
y2record component
-
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
round
public int round()Returns the value of theroundrecord component.- Returns:
- the value of the
roundrecord component
-