Union extends BinaryExpr { @Override public boolean overlaps(@Nonnull final GeoArea area) { return opLeft.overlaps(area) || opRight.overlaps(area); } Union(
            @Nonnull final GeoArea opLeft,
            @Nonnull final GeoArea opRight); @Override boolean overlaps(@Nonnull final GeoArea area); @Override boolean contains(@Nonnull final GeoArea area); @Override boolean contains(@Nonnull final GeoPoint point); @Nonnull @Override Union translate(@Nonnull final GeoVector vector); @Nonnull @Override Union moveTo(@Nonnull final GeoPoint origin); @Override @Nonnull GeoRectangle boundingBox(); @Override boolean canEqual(@Nonnull final Object obj); @Override boolean equals(@Nullable final Object obj); @Override int hashCode();  }
@Test public void testOverlaps() { LOG.info("testOverlaps"); final GeoArea a = new GeoRectangle(new GeoPoint(1.0, 2.0), new GeoPoint(3.0, 4.0)); final GeoRectangle b1 = new GeoRectangle(new GeoPoint(2.5, 3.5), new GeoPoint(3.5, 4.5)); final GeoRectangle b2 = new GeoRectangle(new GeoPoint(0.0, 0.0), new GeoPoint(0.5, 0.5)); final GeoRectangle b3 = new GeoRectangle(new GeoPoint(3.5, 4.5), new GeoPoint(4.0, 5.0)); Assert.assertTrue(a.overlaps(b1)); Assert.assertFalse(a.overlaps(b2)); Assert.assertFalse(a.overlaps(b3)); }