Record Class ZoneCreator.Rectangle
java.lang.Object
java.lang.Record
zombie.pathfind.extra.ZoneCreator.Rectangle
- Enclosing class:
ZoneCreator
public static record ZoneCreator.Rectangle(int xmin, int xmax, int ymin, int ymax, int z)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionRectangle
(int xmin, int xmax, int ymin, int ymax, int z) Creates an instance of aRectangle
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.int
xmax()
Returns the value of thexmax
record component.int
xmin()
Returns the value of thexmin
record component.int
ymax()
Returns the value of theymax
record component.int
ymin()
Returns the value of theymin
record component.int
z()
Returns the value of thez
record component.
-
Constructor Details
-
Rectangle
public Rectangle(int xmin, int xmax, int ymin, int ymax, int z) Creates an instance of aRectangle
record class.- Parameters:
xmin
- the value for thexmin
record componentxmax
- the value for thexmax
record componentymin
- the value for theymin
record componentymax
- the value for theymax
record componentz
- the value for thez
record 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. All components in this record class are compared with thecompare
method from their corresponding wrapper classes. -
xmin
public int xmin()Returns the value of thexmin
record component.- Returns:
- the value of the
xmin
record component
-
xmax
public int xmax()Returns the value of thexmax
record component.- Returns:
- the value of the
xmax
record component
-
ymin
public int ymin()Returns the value of theymin
record component.- Returns:
- the value of the
ymin
record component
-
ymax
public int ymax()Returns the value of theymax
record component.- Returns:
- the value of the
ymax
record component
-
z
public int z()Returns the value of thez
record component.- Returns:
- the value of the
z
record component
-