Class Rectangle


  • public class Rectangle
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int height  
      int width  
      int x  
      int y  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      Dimension getDimension()  
      int getHeight()  
      Point getPoint()  
      int getWidth()  
      int getX()  
      int getY()  
      int hashCode()  
      void setHeight​(int height)
      Deprecated.
      Rectangle objects are supposed to be immutable, all setters will be removed soon
      void setWidth​(int width)
      Deprecated.
      Rectangle objects are supposed to be immutable, all setters will be removed soon
      void setX​(int x)
      Deprecated.
      Rectangle objects are supposed to be immutable, all setters will be removed soon
      void setY​(int y)
      Deprecated.
      Rectangle objects are supposed to be immutable, all setters will be removed soon
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • x

        public int x
      • y

        public int y
      • height

        public int height
      • width

        public int width
    • Constructor Detail

      • Rectangle

        public Rectangle​(int x,
                         int y,
                         int height,
                         int width)
    • Method Detail

      • getX

        public int getX()
      • getY

        public int getY()
      • setX

        @Deprecated
        public void setX​(int x)
        Deprecated.
        Rectangle objects are supposed to be immutable, all setters will be removed soon
      • setY

        @Deprecated
        public void setY​(int y)
        Deprecated.
        Rectangle objects are supposed to be immutable, all setters will be removed soon
      • getHeight

        public int getHeight()
      • setHeight

        @Deprecated
        public void setHeight​(int height)
        Deprecated.
        Rectangle objects are supposed to be immutable, all setters will be removed soon
      • getWidth

        public int getWidth()
      • setWidth

        @Deprecated
        public void setWidth​(int width)
        Deprecated.
        Rectangle objects are supposed to be immutable, all setters will be removed soon
      • getPoint

        public Point getPoint()
      • getDimension

        public Dimension getDimension()
      • equals

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

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object