@Test public void testContains() { BoundingBox bbox = new BoundingBox(45, 46, 121, 120); assertContains(bbox, new WGS84Point(45.5, 120.5)); assertNotContains(bbox, new WGS84Point(90, 90)); }
public boolean contains(WGS84Point point) { return (point.getLatitude() >= minLat) && (point.getLongitude() >= minLon) && (point.getLatitude() <= maxLat) && (point.getLongitude() <= maxLon); }
BoundingBox implements Serializable { public boolean contains(WGS84Point point) { return (point.getLatitude() >= minLat) && (point.getLongitude() >= minLon) && (point.getLatitude() <= maxLat) && (point.getLongitude() <= maxLon); } }
BoundingBox implements Serializable { public boolean contains(WGS84Point point) { return (point.getLatitude() >= minLat) && (point.getLongitude() >= minLon) && (point.getLatitude() <= maxLat) && (point.getLongitude() <= maxLon); } BoundingBox(WGS84Point p1, WGS84Point p2);  BoundingBox(double y1, double y2, double x1, double x2);  BoundingBox(BoundingBox that); }
BoundingBox implements Serializable { public boolean contains(WGS84Point point) { return (point.getLatitude() >= minLat) && (point.getLongitude() >= minLon) && (point.getLatitude() <= maxLat) && (point.getLongitude() <= maxLon); } BoundingBox(WGS84Point p1, WGS84Point p2);  BoundingBox(double y1, double y2, double x1, double x2);  BoundingBox(BoundingBox that); WGS84Point getUpperLeft(); WGS84Point getLowerRight(); double getLatitudeSize(); double getLongitudeSize(); @Override boolean equals(Object obj); @Override int hashCode(); boolean contains(WGS84Point point); boolean intersects(BoundingBox other); @Override String toString(); WGS84Point getCenterPoint(); void expandToInclude(BoundingBox other); double getMinLon(); double getMinLat(); double getMaxLat(); double getMaxLon(); }
BoundingBox implements Serializable { public boolean contains(WGS84Point point) { return (point.getLatitude() >= minLat) && (point.getLongitude() >= minLon) && (point.getLatitude() <= maxLat) && (point.getLongitude() <= maxLon); } BoundingBox(WGS84Point p1, WGS84Point p2);  BoundingBox(double y1, double y2, double x1, double x2);  BoundingBox(BoundingBox that); WGS84Point getUpperLeft(); WGS84Point getLowerRight(); double getLatitudeSize(); double getLongitudeSize(); @Override boolean equals(Object obj); @Override int hashCode(); boolean contains(WGS84Point point); boolean intersects(BoundingBox other); @Override String toString(); WGS84Point getCenterPoint(); void expandToInclude(BoundingBox other); double getMinLon(); double getMinLat(); double getMaxLat(); double getMaxLon();  }