Interface CoordI2
-
- All Superinterfaces:
Comparable<CoordI2>
,Coord2Conversion
,HasPosition2
- All Known Implementing Classes:
ImmutableCoordI2
,MutableCoordI2
public interface CoordI2 extends HasPosition2, Comparable<CoordI2>, Coord2Conversion
An integer tuple (can represent a point, a coordinate or a vector in 2D space).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description CoordI2
add(int n)
CoordI2
add(int dx, int dy)
CoordI2
add(HasPosition2 delta)
default int
compareTo(CoordI2 other)
CoordI2
divide(int n)
CoordI2
divide(int dx, int dy)
CoordI2
divide(HasPosition2 delta)
default CoordI2
getPosition()
int
getX()
int
getY()
CoordI2
multiply(int n)
CoordI2
multiply(int dx, int dy)
CoordI2
multiply(HasPosition2 delta)
void
setX(int x)
CoordI2
setXY(int x, int y)
CoordI2
setXY(HasPosition2 other)
void
setY(int y)
CoordI2
substract(int n)
CoordI2
substract(int dx, int dy)
CoordI2
substract(HasPosition2 delta)
-
Methods inherited from interface de.extio.spacecraft.shared.model.world.Coord2Conversion
toImmutableCoordD2, toImmutableCoordI2, toMutableCoordD2, toMutableCoordI2, toVNorm
-
-
-
-
Method Detail
-
getX
int getX()
-
setX
void setX(int x)
-
getY
int getY()
-
setY
void setY(int y)
-
setXY
CoordI2 setXY(HasPosition2 other)
-
setXY
CoordI2 setXY(int x, int y)
-
add
CoordI2 add(HasPosition2 delta)
-
add
CoordI2 add(int dx, int dy)
-
add
CoordI2 add(int n)
-
substract
CoordI2 substract(HasPosition2 delta)
-
substract
CoordI2 substract(int dx, int dy)
-
substract
CoordI2 substract(int n)
-
multiply
CoordI2 multiply(HasPosition2 delta)
-
multiply
CoordI2 multiply(int dx, int dy)
-
multiply
CoordI2 multiply(int n)
-
divide
CoordI2 divide(HasPosition2 delta)
-
divide
CoordI2 divide(int dx, int dy)
-
divide
CoordI2 divide(int n)
-
getPosition
default CoordI2 getPosition()
- Specified by:
getPosition
in interfaceHasPosition2
-
compareTo
default int compareTo(CoordI2 other)
- Specified by:
compareTo
in interfaceComparable<CoordI2>
-
-