/** * Test if this rectangle fully encloses a {@link Located} item * * @param item * The item to test * @return True if this rectangle contains a {@link Located} item */ public boolean fullyGeometricallyEncloses(final Located item) { final Rectangle bounds = item instanceof Rectangle ? (Rectangle) item : item.bounds(); return this.lowerLeft().getLatitude().isLessThanOrEqualTo(bounds.lowerLeft().getLatitude()) && this.lowerLeft().getLongitude() .isLessThanOrEqualTo(bounds.lowerLeft().getLongitude()) && this.upperRight().getLatitude() .isGreaterThanOrEqualTo(bounds.upperRight().getLatitude()) && this.upperRight().getLongitude() .isGreaterThanOrEqualTo(bounds.upperRight().getLongitude()); }