Package xyz.calcugames.levelz.coord
Class CoordinateMatrix
java.lang.Object
xyz.calcugames.levelz.coord.CoordinateMatrix
- All Implemented Interfaces:
Iterable<Coordinate>
- Direct Known Subclasses:
CoordinateMatrix2D
,CoordinateMatrix3D
Represents a matrix of coordinates.
-
Constructor Summary
ModifierConstructorDescriptionprotected
CoordinateMatrix
(@NotNull Dimension dimension) Creates a new Coordinate Matrix. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
abstract @NotNull Set<? extends Coordinate>
Gets the coordinates in the matrix.final @NotNull Dimension
Gets the dimension of the matrix.abstract @NotNull Coordinate
getStart()
Gets the starting coordinate of the matrix.final int
hashCode()
final @NotNull Iterator<Coordinate>
iterator()
abstract String
toString()
Gets the string version of this coordinate matrix.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
CoordinateMatrix
Creates a new Coordinate Matrix.- Parameters:
dimension
- The dimension of the matrix.
-
-
Method Details
-
getDimension
Gets the dimension of the matrix.- Returns:
- The dimension of the matrix.
-
getCoordinates
Gets the coordinates in the matrix.- Returns:
- The coordinates in the matrix.
-
getStart
Gets the starting coordinate of the matrix.- Returns:
- The starting coordinate of the matrix.
-
toString
Gets the string version of this coordinate matrix. -
iterator
- Specified by:
iterator
in interfaceIterable<Coordinate>
-
equals
-
hashCode
public final int hashCode()
-