@Test public void testIsWithin() throws Exception { RectRegion region1 = new RectRegion(0, 100, 0, 100, ""); RectRegion region2 = new RectRegion(5, 10, 5, 10, ""); assertTrue(region1.intersects(region2)); assertTrue(region2.intersects(region1)); RectRegion region3 = new RectRegion(101, 200, 101, 200, ""); assertFalse(region1.intersects(region3)); assertFalse(region3.intersects(region1)); RectRegion region4 = new RectRegion(99, 109, 99, 109, ""); assertTrue(region1.intersects(region4)); assertTrue(region4.intersects(region1)); RectRegion region5 = new RectRegion(-100, 1, -100, 1, ""); assertTrue(region1.intersects(region5)); assertTrue(region5.intersects(region1)); }
public boolean intersects(RectRegion region) { return intersects(region.getMinX(), region.getMaxX(), region.getMinY(), region.getMaxY()); }
RectRegion { public boolean intersects(RectRegion region) { return intersects(region.getMinX(), region.getMaxX(), region.getMinY(), region.getMaxY()); } }
RectRegion { public boolean intersects(RectRegion region) { return intersects(region.getMinX(), region.getMaxX(), region.getMinY(), region.getMaxY()); } RectRegion(Number minX, Number maxX, Number minY, Number maxY, String label); @SuppressWarnings("SameParameterValue")  RectRegion(Number minX, Number maxX, Number minY, Number maxY); }
RectRegion { public boolean intersects(RectRegion region) { return intersects(region.getMinX(), region.getMaxX(), region.getMinY(), region.getMaxY()); } RectRegion(Number minX, Number maxX, Number minY, Number maxY, String label); @SuppressWarnings("SameParameterValue")  RectRegion(Number minX, Number maxX, Number minY, Number maxY); boolean containsPoint(PointF point); boolean containsValue(Number x, Number y); boolean containsDomainValue(Number value); boolean containsRangeValue(Number value); boolean intersects(RectRegion region); boolean intersects(Number minX, Number maxX, Number minY, Number maxY); boolean intersects(RectF region, Number visMinX, Number visMaxX, Number visMinY, Number visMaxY); RectF getRectF(RectF plotRect, Number visMinX, Number visMaxX, Number visMinY, Number visMaxY); static List<RectRegion> regionsWithin(List<RectRegion> regions, Number minX, Number maxX, Number minY, Number maxY); Number getMinX(); void setMinX(double minX); Number getMaxX(); void setMaxX(Number maxX); Number getMinY(); void setMinY(Number minY); Number getMaxY(); void setMaxY(Number maxY); String getLabel(); void setLabel(String label); }
RectRegion { public boolean intersects(RectRegion region) { return intersects(region.getMinX(), region.getMaxX(), region.getMinY(), region.getMaxY()); } RectRegion(Number minX, Number maxX, Number minY, Number maxY, String label); @SuppressWarnings("SameParameterValue")  RectRegion(Number minX, Number maxX, Number minY, Number maxY); boolean containsPoint(PointF point); boolean containsValue(Number x, Number y); boolean containsDomainValue(Number value); boolean containsRangeValue(Number value); boolean intersects(RectRegion region); boolean intersects(Number minX, Number maxX, Number minY, Number maxY); boolean intersects(RectF region, Number visMinX, Number visMaxX, Number visMinY, Number visMaxY); RectF getRectF(RectF plotRect, Number visMinX, Number visMaxX, Number visMinY, Number visMaxY); static List<RectRegion> regionsWithin(List<RectRegion> regions, Number minX, Number maxX, Number minY, Number maxY); Number getMinX(); void setMinX(double minX); Number getMaxX(); void setMaxX(Number maxX); Number getMinY(); void setMinY(Number minY); Number getMaxY(); void setMaxY(Number maxY); String getLabel(); void setLabel(String label);  }