moagg.types.math
Class Rectangle
java.lang.Object
moagg.types.math.Rectangle
public class Rectangle
- extends java.lang.Object
A custom Rectangle class, since java.awt.Rectangle uses double in its interface (ugh).
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Rectangle
public Rectangle()
Rectangle
public Rectangle(int x,
int y,
int w,
int h)
Rectangle
public Rectangle(Rectangle other)
getX
public int getX()
setX
public void setX(int x)
getY
public int getY()
setY
public void setY(int y)
getW
public int getW()
setW
public void setW(int w)
getH
public int getH()
setH
public void setH(int h)
translate
public void translate(int x,
int y)
contains
public boolean contains(Rectangle other)
contains
public boolean contains(Point point)
getCenter
public Point getCenter()
intersect
public Rectangle intersect(Rectangle other)
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2008. All Rights Reserved.