Class 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 Detail

      • GEOMETRY_96_8X12

        public static final Geometry GEOMETRY_96_8X12
      • GEOMETRY_384_16X24

        public static final Geometry GEOMETRY_384_16X24
      • GEOMETRY_1536_32X48

        public static final Geometry GEOMETRY_1536_32X48
    • 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 an int[]. The width is the x-dimension and the height is the y-dimension.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.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 class java.lang.Object