Added iteration logic.

This commit is contained in:
Ilkka Seppala
2015-05-08 21:01:06 +03:00
parent 41b818771e
commit fba664ba49
5 changed files with 44 additions and 9 deletions

View File

@ -30,4 +30,9 @@ public class Rectangle {
boolean intersectsWith(Rectangle r) {
return !(r.getLeft() > getRight() || r.getRight() < getLeft() || r.getTop() > getBottom() || r.getBottom() < getTop());
}
@Override
public String toString() {
return String.format("[%d,%d,%d,%d]", getLeft(), getTop(), getRight(), getBottom());
}
}