public interface RectangleIntersectionTester
add(Rectangle, boolean) and queries can be submitted with
isFree(Rectangle). Currently the data structure does not support removal operations.
void add(Rectanglerectangle, boolean clone)
isFree(Rectangle) that intersect the specified rectangle will return false.
rectangle - the region to mark as covered
clone - whether the argument can be stored or it should be cloned to a new object (depends on whether you're reusing the same object on your end)
boolean isFree(Rectanglerectangle)
add(Rectangle, boolean) before.
rectangle - the region to test for