Package de.xima.fc.common.geometry
Class Rectangular2DDouble
- java.lang.Object
-
- de.xima.fc.common.geometry.Rectangular2DDouble
-
- All Implemented Interfaces:
Rectangular,Rectangular1D<Double>,Rectangular1DLike<Double>,Rectangular2D<Double>,Rectangular2DLike<Double>,Serializable
public final class Rectangular2DDouble extends Object implements Rectangular2D<Double>, Rectangular2DLike<Double>
A two-dimensional rectangular shape, with a width and a height, where both dimensions are of typedouble.- Since:
- 8.4.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Rectangular2DDouble(double width, double height)Creates a new rectangular shape with the specified width and height.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intdimensions()The dimension of the rectangle.static Rectangular2DDoubleempty()Creates an empty rectangular shape with zero width and height.booleanequals(Object o)inthashCode()Doubleheight()Returns the height of the rectangular shape.byteheightByte()Returns the height of the rectangular shape as a byte.doubleheightDouble()Returns the height of the rectangular shape as a double.floatheightFloat()Returns the height of the rectangular shape as a float.intheightInt()Returns the height of the rectangular shape as an int.longheightLong()Returns the height of the rectangular shape as a long.shortheightShort()Returns the height of the rectangular shape as a short.Doublelength(ECartesianAxis1D axis)Gets the length of the side along the specified axis.Doublelength(ECartesianAxis2D axis)Gets the length of the side along the specified axis.doublelengthDouble(ECartesianAxis1D axis)Gets the length of the side along the specified axis, as a double.doublelengthDouble(ECartesianAxis2D axis)Gets the length of the side along the specified axis as a double.Rectangular2DDoubleplus(byte deltaWidth, byte deltaHeight)Creates a new rectangular shape with the specified delta width and height added to the current width and height.Rectangular2DDoubleplus(double deltaWidth, double deltaHeight)Creates a new rectangular shape with the specified delta width and height added to the current width and height.Rectangular2DDoubleplus(float deltaWidth, float deltaHeight)Creates a new rectangular shape with the specified delta width and height added to the current width and height.Rectangular2DDoubleplus(int deltaWidth, int deltaHeight)Creates a new rectangular shape with the specified delta width and height added to the current width and height.Rectangular2DDoubleplus(long deltaWidth, long deltaHeight)Creates a new rectangular shape with the specified delta width and height added to the current width and height.Rectangular2DDoubleplus(short deltaWidth, short deltaHeight)Creates a new rectangular shape with the specified delta width and height added to the current width and height.Rectangular2DDoubleplus(Double deltaWidth, Double deltaHeight)Creates a new rectangular shape with the specified delta width and height added to the current width and height.StringtoString()Doublewidth()Returns the width of the rectangular shape.doublewidthDouble()Returns the width of the rectangular shape as a double.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.xima.fc.common.geometry.Rectangular1DLike
lengthByte, lengthFloat, lengthInt, lengthLong, lengthShort, widthByte, widthFloat, widthInt, widthLong, widthShort
-
Methods inherited from interface de.xima.fc.common.geometry.Rectangular2D
lengthByte, lengthFloat, lengthInt, lengthLong, lengthShort
-
-
-
-
Method Detail
-
dimensions
public int dimensions()
Description copied from interface:RectangularThe dimension of the rectangle.- Specified by:
dimensionsin interfaceRectangular- Specified by:
dimensionsin interfaceRectangular1D<Double>- Specified by:
dimensionsin interfaceRectangular2D<Double>- Returns:
- The dimensionality of the rectangle.
-
height
public Double height()
Description copied from interface:Rectangular2DReturns the height of the rectangular shape.- Specified by:
heightin interfaceRectangular2D<Double>- Specified by:
heightin interfaceRectangular2DLike<Double>- 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<Double>- Specified by:
heightBytein interfaceRectangular2DLike<Double>- 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<Double>- Specified by:
heightDoublein interfaceRectangular2DLike<Double>- 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<Double>- Specified by:
heightFloatin interfaceRectangular2DLike<Double>- 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<Double>- Specified by:
heightIntin interfaceRectangular2DLike<Double>- 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<Double>- Specified by:
heightLongin interfaceRectangular2DLike<Double>- 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<Double>- Specified by:
heightShortin interfaceRectangular2DLike<Double>- Returns:
- the height
-
length
public Double length(ECartesianAxis2D axis)
Description copied from interface:Rectangular2DGets the length of the side along the specified axis.- Specified by:
lengthin interfaceRectangular2D<Double>- Parameters:
axis- the axis to get the length along- Returns:
- the length along the specified axis
-
length
public Double length(ECartesianAxis1D axis)
Description copied from interface:Rectangular1DLikeGets the length of the side along the specified axis.- Specified by:
lengthin interfaceRectangular1DLike<Double>- Parameters:
axis- the axis to get the length along- Returns:
- The length along the specified axis
-
lengthDouble
public double lengthDouble(ECartesianAxis2D axis)
Description copied from interface:Rectangular2DGets the length of the side along the specified axis as a double.- Specified by:
lengthDoublein interfaceRectangular2D<Double>- Parameters:
axis- the axis to get the length along- Returns:
- the length along the specified axis
-
lengthDouble
public double lengthDouble(ECartesianAxis1D axis)
Description copied from interface:Rectangular1DLikeGets the length of the side along the specified axis, as a double.- Specified by:
lengthDoublein interfaceRectangular1DLike<Double>- Parameters:
axis- the axis to get the length along- Returns:
- The length along the specified axis
-
plus
public Rectangular2DDouble plus(Double deltaWidth, Double deltaHeight)
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<Double>- 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
public Rectangular2DDouble plus(byte deltaWidth, byte deltaHeight)
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<Double>- 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
public Rectangular2DDouble plus(short deltaWidth, short deltaHeight)
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<Double>- 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
public Rectangular2DDouble plus(int deltaWidth, int deltaHeight)
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<Double>- 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
public Rectangular2DDouble plus(long deltaWidth, long deltaHeight)
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<Double>- 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
public Rectangular2DDouble plus(float deltaWidth, float deltaHeight)
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<Double>- 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
public Rectangular2DDouble plus(double deltaWidth, double deltaHeight)
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<Double>- 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.
-
width
public Double width()
Description copied from interface:Rectangular1DLikeReturns the width of the rectangular shape.- Specified by:
widthin interfaceRectangular1DLike<Double>- 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<Double>- Returns:
- the width
-
empty
public static Rectangular2DDouble empty()
Creates an empty rectangular shape with zero width and height.- Returns:
- An empty rectangular shape.
-
-