Package de.xima.fc.common.geometry
Interface Rectangular2D<Numerical extends Number>
-
- Type Parameters:
Numerical
- the type of the width and height
- All Superinterfaces:
Rectangular
,Rectangular1DLike<Numerical>
,Serializable
- All Known Implementing Classes:
Rectangular2DDouble
public interface Rectangular2D<Numerical extends Number> extends Rectangular1DLike<Numerical>
A 2-dimensional rectangular shape.- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default int
dimensions()
The dimension of the rectangle.Numerical
height()
Returns the height of the rectangular shape.default byte
heightByte()
Returns the height of the rectangular shape as a byte.default double
heightDouble()
Returns the height of the rectangular shape as a double.default float
heightFloat()
Returns the height of the rectangular shape as a float.default int
heightInt()
Returns the height of the rectangular shape as an int.default long
heightLong()
Returns the height of the rectangular shape as a long.default short
heightShort()
Returns the height of the rectangular shape as a short.Numerical
length(ECartesianAxis2D axis)
Gets the length of the side along the specified axis.default byte
lengthByte(ECartesianAxis2D axis)
Gets the length of the side along the specified axis as a byte.default double
lengthDouble(ECartesianAxis2D axis)
Gets the length of the side along the specified axis as a double.default float
lengthFloat(ECartesianAxis2D axis)
Gets the length of the side along the specified axis as a float.default int
lengthInt(ECartesianAxis2D axis)
Gets the length of the side along the specified axis as an int.default long
lengthLong(ECartesianAxis2D axis)
Gets the length of the side along the specified axis as a long.default short
lengthShort(ECartesianAxis2D axis)
Gets the length of the side along the specified axis as a short.Rectangular2D<Numerical>
plus(byte deltaWidth, byte deltaHeight)
Creates a new rectangular shape with the specified delta width and height added to the current width and height.Rectangular2D<Numerical>
plus(double deltaWidth, double deltaHeight)
Creates a new rectangular shape with the specified delta width and height added to the current width and height.Rectangular2D<Numerical>
plus(float deltaWidth, float deltaHeight)
Creates a new rectangular shape with the specified delta width and height added to the current width and height.Rectangular2D<Numerical>
plus(int deltaWidth, int deltaHeight)
Creates a new rectangular shape with the specified delta width and height added to the current width and height.Rectangular2D<Numerical>
plus(long deltaWidth, long deltaHeight)
Creates a new rectangular shape with the specified delta width and height added to the current width and height.Rectangular2D<Numerical>
plus(short deltaWidth, short deltaHeight)
Creates a new rectangular shape with the specified delta width and height added to the current width and height.Rectangular2D<Numerical>
plus(Numerical deltaWidth, Numerical deltaHeight)
Creates a new rectangular shape with the specified delta width and height added to the current width and height.-
Methods inherited from interface de.xima.fc.common.geometry.Rectangular1DLike
length, lengthByte, lengthDouble, lengthFloat, lengthInt, lengthLong, lengthShort, width, widthByte, widthDouble, widthFloat, widthInt, widthLong, widthShort
-
-
-
-
Method Detail
-
dimensions
default int dimensions()
Description copied from interface:Rectangular
The dimension of the rectangle.- Specified by:
dimensions
in interfaceRectangular
- Returns:
- The dimensionality of the rectangle.
-
height
Numerical height()
Returns the height of the rectangular shape.- Returns:
- the height
-
heightByte
default byte heightByte()
Returns the height of the rectangular shape as a byte.- Returns:
- the height
-
heightDouble
default double heightDouble()
Returns the height of the rectangular shape as a double.- Returns:
- the height
-
heightFloat
default float heightFloat()
Returns the height of the rectangular shape as a float.- Returns:
- the height
-
heightInt
default int heightInt()
Returns the height of the rectangular shape as an int.- Returns:
- the height
-
heightLong
default long heightLong()
Returns the height of the rectangular shape as a long.- Returns:
- the height
-
heightShort
default short heightShort()
Returns the height of the rectangular shape as a short.- Returns:
- the height
-
length
Numerical length(ECartesianAxis2D axis)
Gets the length of the side along the specified axis.- Parameters:
axis
- the axis to get the length along- Returns:
- the length along the specified axis
-
lengthByte
default byte lengthByte(ECartesianAxis2D axis)
Gets the length of the side along the specified axis as a byte.- Parameters:
axis
- the axis to get the length along- Returns:
- the length along the specified axis
-
lengthDouble
default double lengthDouble(ECartesianAxis2D axis)
Gets the length of the side along the specified axis as a double.- Parameters:
axis
- the axis to get the length along- Returns:
- the length along the specified axis
-
lengthFloat
default float lengthFloat(ECartesianAxis2D axis)
Gets the length of the side along the specified axis as a float.- Parameters:
axis
- the axis to get the length along- Returns:
- the length along the specified axis
-
lengthInt
default int lengthInt(ECartesianAxis2D axis)
Gets the length of the side along the specified axis as an int.- Parameters:
axis
- the axis to get the length along- Returns:
- the length along the specified axis
-
lengthLong
default long lengthLong(ECartesianAxis2D axis)
Gets the length of the side along the specified axis as a long.- Parameters:
axis
- the axis to get the length along- Returns:
- the length along the specified axis
-
lengthShort
default short lengthShort(ECartesianAxis2D axis)
Gets the length of the side along the specified axis as a short.- Parameters:
axis
- the axis to get the length along- Returns:
- the length along the specified axis
-
plus
Rectangular2D<Numerical> plus(Numerical deltaWidth, Numerical deltaHeight)
Creates a new rectangular shape with the specified delta width and height added to the current width and height.- Parameters:
deltaWidth
- the width to add to the current widthdeltaHeight
- the height to add to the current height- Returns:
- A new rectangular shape with the specified dimensions.
-
plus
Rectangular2D<Numerical> plus(byte deltaWidth, byte deltaHeight)
Creates a new rectangular shape with the specified delta width and height added to the current width and height.- Parameters:
deltaWidth
- the width to add to the current widthdeltaHeight
- the height to add to the current height- Returns:
- A new rectangular shape with the specified dimensions.
-
plus
Rectangular2D<Numerical> plus(short deltaWidth, short deltaHeight)
Creates a new rectangular shape with the specified delta width and height added to the current width and height.- Parameters:
deltaWidth
- the width to add to the current widthdeltaHeight
- the height to add to the current height- Returns:
- A new rectangular shape with the specified dimensions.
-
plus
Rectangular2D<Numerical> plus(int deltaWidth, int deltaHeight)
Creates a new rectangular shape with the specified delta width and height added to the current width and height.- Parameters:
deltaWidth
- the width to add to the current widthdeltaHeight
- the height to add to the current height- Returns:
- A new rectangular shape with the specified dimensions.
-
plus
Rectangular2D<Numerical> plus(long deltaWidth, long deltaHeight)
Creates a new rectangular shape with the specified delta width and height added to the current width and height.- Parameters:
deltaWidth
- the width to add to the current widthdeltaHeight
- the height to add to the current height- Returns:
- A new rectangular shape with the specified dimensions.
-
plus
Rectangular2D<Numerical> plus(float deltaWidth, float deltaHeight)
Creates a new rectangular shape with the specified delta width and height added to the current width and height.- Parameters:
deltaWidth
- the width to add to the current widthdeltaHeight
- the height to add to the current height- Returns:
- A new rectangular shape with the specified dimensions.
-
plus
Rectangular2D<Numerical> plus(double deltaWidth, double deltaHeight)
Creates a new rectangular shape with the specified delta width and height added to the current width and height.- Parameters:
deltaWidth
- the width to add to the current widthdeltaHeight
- the height to add to the current height- Returns:
- A new rectangular shape with the specified dimensions.
-
-