Interface IRectangle

    • Method Detail

      • getRectangleCopy

        IRectangle getRectangleCopy()
        Returns:
        An exact copy of the current rectangle instance.
      • setRectangle

        void setRectangle​(int x,
                          int y,
                          int width,
                          int height)
        Sets the location and dimension of the rectangle.
        Parameters:
        x - the x coordinate of the rectangle
        y - the y coordinate of the rectangle
        width - the width of the rectangle
        height - the height of the rectangle
      • setRectangle

        void setRectangle​(IRectangle rectangle)
        Sets the location and dimension of the rectangle to the values of the given rectangle.
        Parameters:
        rectangle - The rectangle which contains new location and dimension.
      • contains

        boolean contains​(int x,
                         int y)
        Checks whether the point with (x,y) is inside the rectangle.
        Parameters:
        x - the x coordinate of the point to be tested
        y - the y coordinate of the point to be tested
        Returns:
        TRUE, if the point with (x,y) is inside the rectangle; FALSE otherwise
      • contains

        boolean contains​(ILocation location)
        Checks whether the point with the given location is inside the rectangle.
        Parameters:
        location - the location of the point to be tested
        Returns:
        TRUE, if the location is inside the rectangle; FALSE otherwise