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.SerializableImmutable 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 GeometryGEOMETRY_1536_32X48static GeometryGEOMETRY_384_16X24static GeometryGEOMETRY_96_8X12
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GeometrycreateFromCartesianDimensions(int[] cartesianDims)Creates a new instance from the given cartesian dimensions.static GeometrycreateFromCartesianDimensions(int maxX, int maxY)Creates a new instance from the given cartesian dimensions.static GeometrycreateFromPlateGeometryString(java.lang.String plateGeometryStr)Creates a new instance from the given number of rows and columns.static GeometrycreateFromRowColDimensions(int numberOfRows, int numberOfColumns)Creates a new instance from the given number of rows and columns.booleanequals(java.lang.Object obj)int[]getCartesianDimensions()Returns the cartesian coordinates as anint[].intgetDimX()Returns the dimension on the x-axis.intgetDimY()Returns the dimension on the y-axis.intgetHeight()Returns the height.intgetNumberOfColumns()Returns the number of columns.intgetNumberOfRows()Returns the number of rows.intgetWidth()Returns the width.inthashCode()java.lang.StringtoPlateGeometryStr()Renders this in the form<width>X<height>.java.lang.StringtoString()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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein 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:
toStringin classjava.lang.Object
-
-