Class SizeXY
The size of an entity in the X and Y dimensions.
i.e. the width and height of an entity.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasExtent()
Creates an extent with identical width and height and depth (z-extent) of 1.asExtent
(int depth) Creates an extent with identical width and height and a specific depth (z-extent).protected boolean
boolean
int
Size in Y dimension.int
getWidth()
Size in X dimension.int
hashCode()
void
setHeight
(int height) Size in Y dimension.void
setWidth
(int width) Size in X dimension.toString()
By default, we useAnchorBean.describeBean()
as the string representation of the bean.Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
-
Constructor Details
-
SizeXY
Create form anExtent
.Note the z-dimension in extent is ignored.
- Parameters:
extent
- the extent.
-
SizeXY
public SizeXY() -
SizeXY
public SizeXY(int width, int height) Creates a newSizeXY
instance.- Parameters:
width
- Size in X dimension. The width.height
- Size in Y dimension. The height.
-
-
Method Details
-
asExtent
Creates an extent with identical width and height and depth (z-extent) of 1.- Returns:
- the newly created extent.
-
asExtent
Creates an extent with identical width and height and a specific depth (z-extent).- Parameters:
depth
- the depth for the extent.- Returns:
- the newly created extent.
-
toString
Description copied from class:AnchorBean
By default, we useAnchorBean.describeBean()
as the string representation of the bean.- Overrides:
toString
in classAnchorBean<SizeXY>
- Returns:
- the string representation
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getWidth
public int getWidth()Size in X dimension. The width. -
setWidth
public void setWidth(int width) Size in X dimension. The width. -
getHeight
public int getHeight()Size in Y dimension. The height. -
setHeight
public void setHeight(int height) Size in Y dimension. The height.
-