Java Utililty Methods Area Intersect

List of utility methods to do Area Intersect

Description

The list of methods to do Area Intersect are organized into topic(s).

Method

booleanintersection(Area a1, Area a2)
Check whether the two provided areas intersect one another.
Area copy = new Area(a1);
copy.intersect(a2);
return !copy.isEmpty();
booleanintersects(Area a, Area b)
intersects
Area a2 = (Area) a.clone();
a2.intersect(b);
return !a2.isEmpty();
booleanintersects(Area lhs, Area rhs)
intersects
if (lhs == null || lhs.isEmpty() || rhs == null || rhs.isEmpty()) {
    return false;
if (!lhs.getBounds().intersects(rhs.getBounds())) {
    return false;
Area newArea = new Area(lhs);
newArea.intersect(rhs);
...