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, Rectangular2DLong
A 2-dimensional rectangular shape.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault intThe dimension of the rectangle.height()Returns the height of the rectangular shape.default byteReturns the height of the rectangular shape as a byte.default doubleReturns the height of the rectangular shape as a double.default floatReturns the height of the rectangular shape as a float.default intReturns the height of the rectangular shape as an int.default longReturns the height of the rectangular shape as a long.default shortReturns the height of the rectangular shape as a short.length(ECartesianAxis2D axis) Gets the length of the side along the specified axis.default bytelengthByte(ECartesianAxis2D axis) Gets the length of the side along the specified axis as a byte.default doublelengthDouble(ECartesianAxis2D axis) Gets the length of the side along the specified axis as a double.default floatlengthFloat(ECartesianAxis2D axis) Gets the length of the side along the specified axis as a float.default intlengthInt(ECartesianAxis2D axis) Gets the length of the side along the specified axis as an int.default longlengthLong(ECartesianAxis2D axis) Gets the length of the side along the specified axis as a long.default shortlengthShort(ECartesianAxis2D axis) Gets the length of the side along the specified axis as a short.plus(byte deltaWidth, byte deltaHeight) Creates a new rectangular shape with the specified delta width and height added to the current width and height.plus(double deltaWidth, double deltaHeight) Creates a new rectangular shape with the specified delta width and height added to the current width and height.plus(float deltaWidth, float deltaHeight) Creates a new rectangular shape with the specified delta width and height added to the current width and height.plus(int deltaWidth, int deltaHeight) Creates a new rectangular shape with the specified delta width and height added to the current width and height.plus(long deltaWidth, long deltaHeight) Creates a new rectangular shape with the specified delta width and height added to the current width and height.plus(short deltaWidth, short deltaHeight) Creates a new rectangular shape with the specified delta width and height added to the current width and height.Creates a new rectangular shape with the specified delta width and height added to the current width and height.Methods inherited from interface Rectangular1DLike
length, lengthByte, lengthDouble, lengthFloat, lengthInt, lengthLong, lengthShort, width, widthByte, widthDouble, widthFloat, widthInt, widthLong, widthShort
-
Method Details
-
dimensions
default int dimensions()Description copied from interface:RectangularThe dimension of the rectangle.- Specified by:
dimensionsin interfaceRectangular- Returns:
- The dimensionality of the rectangle.
-
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
-