CoordinateBounds implements Serializable { public boolean intersects(CoordinateBounds r) { double minLat = Math.max(_minLat, r._minLat); double minLon = Math.max(_minLon, r._minLon); double maxLat = Math.min(_maxLat, r._maxLat); double maxLon = Math.min(_maxLon, r._maxLon); return minLat <= maxLat && minLon <= maxLon; } CoordinateBounds();  CoordinateBounds(double lat, double lon);  CoordinateBounds(CoordinateBounds bounds);  CoordinateBounds(double minLat, double minLon, double maxLat,
      double maxLon); boolean isEmpty(); void setEmpty(boolean empty); double getMinLat(); void setMinLat(double minLat); double getMinLon(); void setMinLon(double minLon); double getMaxLat(); void setMaxLat(double maxLat); double getMaxLon(); void setMaxLon(double maxLon); void addPoint(double lat, double lon); void addBounds(CoordinateBounds bounds); void clear(); boolean contains(double lat, double lon); boolean contains(CoordinatePoint point); boolean intersects(CoordinateBounds r); CoordinateBounds intersection(CoordinateBounds r); CoordinateBounds union(CoordinateBounds r); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testIntersects() { CoordinateBounds bounds = new CoordinateBounds(1,2,3,4); assertTrue(bounds.intersects(new CoordinateBounds(1,2,3,4))); assertTrue(bounds.intersects(new CoordinateBounds(0,0,2,3))); assertTrue(bounds.intersects(new CoordinateBounds(0,0,1,2))); assertFalse(bounds.intersects(new CoordinateBounds(0,0,1,1))); }