Class Geometry
- java.lang.Object
-
- ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.Geometry
-
- All Implemented Interfaces:
java.io.Serializable
@JsonObject("Geometry") public final class Geometry extends java.lang.Object implements java.io.Serializable
Immutable class defining the width and height of something. Two instances are equal if and only if the widths and heights are equal.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static Geometry
GEOMETRY_1536_32X48
static Geometry
GEOMETRY_384_16X24
static Geometry
GEOMETRY_96_8X12
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Geometry
createFromCartesianDimensions(int[] cartesianDims)
Creates a new instance from the given cartesian dimensions.static Geometry
createFromCartesianDimensions(int maxX, int maxY)
Creates a new instance from the given cartesian dimensions.static Geometry
createFromPlateGeometryString(java.lang.String plateGeometryStr)
Creates a new instance from the given number of rows and columns.static Geometry
createFromRowColDimensions(int numberOfRows, int numberOfColumns)
Creates a new instance from the given number of rows and columns.boolean
equals(java.lang.Object obj)
int[]
getCartesianDimensions()
Returns the cartesian coordinates as anint[]
.int
getDimX()
Returns the dimension on the x-axis.int
getDimY()
Returns the dimension on the y-axis.int
getHeight()
Returns the height.int
getNumberOfColumns()
Returns the number of columns.int
getNumberOfRows()
Returns the number of rows.int
getWidth()
Returns the width.int
hashCode()
java.lang.String
toPlateGeometryStr()
Renders this in the form<width>X<height>
.java.lang.String
toString()
Renders this in the form{<width>,<height>}
.
-
-
-
Method Detail
-
createFromCartesianDimensions
public static Geometry createFromCartesianDimensions(int maxX, int maxY)
Creates a new instance from the given cartesian dimensions.
-
createFromCartesianDimensions
public static Geometry createFromCartesianDimensions(int[] cartesianDims)
Creates a new instance from the given cartesian dimensions.
-
createFromRowColDimensions
public static Geometry createFromRowColDimensions(int numberOfRows, int numberOfColumns)
Creates a new instance from the given number of rows and columns.
-
createFromPlateGeometryString
public static Geometry createFromPlateGeometryString(java.lang.String plateGeometryStr)
Creates a new instance from the given number of rows and columns.
-
getWidth
public final int getWidth()
Returns the width.- Returns:
- a non-negative number.
-
getHeight
public final int getHeight()
Returns the height.- Returns:
- a non-negative number.
-
getNumberOfColumns
public final int getNumberOfColumns()
Returns the number of columns.- Returns:
- a non-negative number.
-
getNumberOfRows
public final int getNumberOfRows()
Returns the number of rows.- Returns:
- a non-negative number.
-
getDimX
public final int getDimX()
Returns the dimension on the x-axis.- Returns:
- a non-negative number.
-
getDimY
public final int getDimY()
Returns the dimension on the y-axis.- Returns:
- a non-negative number.
-
getCartesianDimensions
public final int[] getCartesianDimensions()
Returns the cartesian coordinates as anint[]
. The width is the x-dimension and the height is the y-dimension.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toPlateGeometryStr
public java.lang.String toPlateGeometryStr()
Renders this in the form<width>X<height>
.
-
toString
public java.lang.String toString()
Renders this in the form{<width>,<height>}
.- Overrides:
toString
in classjava.lang.Object
-
-