Class Rectangular2DLong
java.lang.Object
de.xima.fc.common.geometry.Rectangular2DLong
- All Implemented Interfaces:
Rectangular, Rectangular1D<Long>, Rectangular1DLike<Long>, Rectangular2D<Long>, Rectangular2DLike<Long>, Serializable
public final class Rectangular2DLong
extends Object
implements Rectangular2D<Long>, Rectangular2DLike<Long>
A two-dimensional rectangular shape, with a width and a height, where both dimensions are of type
long.- Since:
- 8.5.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRectangular2DLong(long width, long height) Creates a new rectangular shape with the specified width and height. -
Method Summary
Modifier and TypeMethodDescriptionintThe dimension of the rectangle.static Rectangular2DLongempty()Creates an empty rectangular shape with zero width and height.booleaninthashCode()height()Returns the height of the rectangular shape.byteReturns the height of the rectangular shape as a byte.doubleReturns the height of the rectangular shape as a double.floatReturns the height of the rectangular shape as a float.intReturns the height of the rectangular shape as an int.longReturns the height of the rectangular shape as a long.shortReturns the height of the rectangular shape as a short.length(ECartesianAxis1D axis) Gets the length of the side along the specified axis.length(ECartesianAxis2D axis) Gets the length of the side along the specified axis.longlengthLong(ECartesianAxis1D axis) Gets the length of the side along the specified axis, as a long.longlengthLong(ECartesianAxis2D axis) Gets the length of the side along the specified axis as a long.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.toString()width()Returns the width of the rectangular shape.byteReturns the width of the rectangular shape as a byte.doubleReturns the width of the rectangular shape as a double.floatReturns the width of the rectangular shape as a float.intwidthInt()Returns the width of the rectangular shape as an int.longReturns the width of the rectangular shape as a long.shortReturns the width of the rectangular shape as a short.Methods inherited from interface Rectangular1DLike
lengthByte, lengthDouble, lengthFloat, lengthInt, lengthShortMethods inherited from interface Rectangular2D
lengthByte, lengthDouble, lengthFloat, lengthInt, lengthShort
-
Constructor Details
-
Rectangular2DLong
public Rectangular2DLong(long width, long height) Creates a new rectangular shape with the specified width and height.- Parameters:
width- The width of the rectangle.height- The height of the rectangle.
-
-
Method Details
-
dimensions
public int dimensions()Description copied from interface:RectangularThe dimension of the rectangle.- Specified by:
dimensionsin interfaceRectangular- Specified by:
dimensionsin interfaceRectangular1D<Long>- Specified by:
dimensionsin interfaceRectangular2D<Long>- Returns:
- The dimensionality of the rectangle.
-
equals
-
hashCode
-
height
Description copied from interface:Rectangular2DReturns the height of the rectangular shape.- Specified by:
heightin interfaceRectangular2D<Long>- Specified by:
heightin interfaceRectangular2DLike<Long>- Returns:
- the height
-
heightByte
public byte heightByte()Description copied from interface:Rectangular2DReturns the height of the rectangular shape as a byte.- Specified by:
heightBytein interfaceRectangular2D<Long>- Specified by:
heightBytein interfaceRectangular2DLike<Long>- Returns:
- the height
-
heightDouble
public double heightDouble()Description copied from interface:Rectangular2DReturns the height of the rectangular shape as a double.- Specified by:
heightDoublein interfaceRectangular2D<Long>- Specified by:
heightDoublein interfaceRectangular2DLike<Long>- Returns:
- the height
-
heightFloat
public float heightFloat()Description copied from interface:Rectangular2DReturns the height of the rectangular shape as a float.- Specified by:
heightFloatin interfaceRectangular2D<Long>- Specified by:
heightFloatin interfaceRectangular2DLike<Long>- Returns:
- the height
-
heightInt
public int heightInt()Description copied from interface:Rectangular2DReturns the height of the rectangular shape as an int.- Specified by:
heightIntin interfaceRectangular2D<Long>- Specified by:
heightIntin interfaceRectangular2DLike<Long>- Returns:
- the height
-
heightLong
public long heightLong()Description copied from interface:Rectangular2DReturns the height of the rectangular shape as a long.- Specified by:
heightLongin interfaceRectangular2D<Long>- Specified by:
heightLongin interfaceRectangular2DLike<Long>- Returns:
- the height
-
heightShort
public short heightShort()Description copied from interface:Rectangular2DReturns the height of the rectangular shape as a short.- Specified by:
heightShortin interfaceRectangular2D<Long>- Specified by:
heightShortin interfaceRectangular2DLike<Long>- Returns:
- the height
-
length
Description copied from interface:Rectangular2DGets the length of the side along the specified axis.- Specified by:
lengthin interfaceRectangular2D<Long>- Parameters:
axis- the axis to get the length along- Returns:
- the length along the specified axis
-
length
Description copied from interface:Rectangular1DLikeGets the length of the side along the specified axis.- Specified by:
lengthin interfaceRectangular1DLike<Long>- Parameters:
axis- the axis to get the length along- Returns:
- The length along the specified axis
-
lengthLong
Description copied from interface:Rectangular2DGets the length of the side along the specified axis as a long.- Specified by:
lengthLongin interfaceRectangular2D<Long>- Parameters:
axis- the axis to get the length along- Returns:
- the length along the specified axis
-
lengthLong
Description copied from interface:Rectangular1DLikeGets the length of the side along the specified axis, as a long.- Specified by:
lengthLongin interfaceRectangular1DLike<Long>- Parameters:
axis- the axis to get the length along- Returns:
- The length along the specified axis
-
plus
Description copied from interface:Rectangular2DCreates a new rectangular shape with the specified delta width and height added to the current width and height.- Specified by:
plusin interfaceRectangular2D<Long>- 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
Description copied from interface:Rectangular2DCreates a new rectangular shape with the specified delta width and height added to the current width and height.- Specified by:
plusin interfaceRectangular2D<Long>- 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
Description copied from interface:Rectangular2DCreates a new rectangular shape with the specified delta width and height added to the current width and height.- Specified by:
plusin interfaceRectangular2D<Long>- 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
Description copied from interface:Rectangular2DCreates a new rectangular shape with the specified delta width and height added to the current width and height.- Specified by:
plusin interfaceRectangular2D<Long>- 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
Description copied from interface:Rectangular2DCreates a new rectangular shape with the specified delta width and height added to the current width and height.- Specified by:
plusin interfaceRectangular2D<Long>- 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
Description copied from interface:Rectangular2DCreates a new rectangular shape with the specified delta width and height added to the current width and height.- Specified by:
plusin interfaceRectangular2D<Long>- 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
Description copied from interface:Rectangular2DCreates a new rectangular shape with the specified delta width and height added to the current width and height.- Specified by:
plusin interfaceRectangular2D<Long>- 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.
-
toString
-
width
Description copied from interface:Rectangular1DLikeReturns the width of the rectangular shape.- Specified by:
widthin interfaceRectangular1DLike<Long>- Returns:
- the width
-
widthByte
public byte widthByte()Description copied from interface:Rectangular1DLikeReturns the width of the rectangular shape as a byte.- Specified by:
widthBytein interfaceRectangular1DLike<Long>- Returns:
- the width
-
widthDouble
public double widthDouble()Description copied from interface:Rectangular1DLikeReturns the width of the rectangular shape as a double.- Specified by:
widthDoublein interfaceRectangular1DLike<Long>- Returns:
- the width
-
widthFloat
public float widthFloat()Description copied from interface:Rectangular1DLikeReturns the width of the rectangular shape as a float.- Specified by:
widthFloatin interfaceRectangular1DLike<Long>- Returns:
- the width
-
widthInt
public int widthInt()Description copied from interface:Rectangular1DLikeReturns the width of the rectangular shape as an int.- Specified by:
widthIntin interfaceRectangular1DLike<Long>- Returns:
- the width
-
widthLong
public long widthLong()Description copied from interface:Rectangular1DLikeReturns the width of the rectangular shape as a long.- Specified by:
widthLongin interfaceRectangular1DLike<Long>- Returns:
- the width
-
widthShort
public short widthShort()Description copied from interface:Rectangular1DLikeReturns the width of the rectangular shape as a short.- Specified by:
widthShortin interfaceRectangular1DLike<Long>- Returns:
- the width
-
empty
Creates an empty rectangular shape with zero width and height.- Returns:
- An empty rectangular shape.
-