public class Bounds extends Object
A latitude-longitude bounding rectangle is represented by a four-element
List<Angle>, where every angle is valid for measuring its coordinate:
The bounding rectangle contains a point (lat, long) if:
PS1 instructions: do NOT change the method signatures or specifications of these methods, but you should implement their method bodies, and you may add new public or private methods or classes if you like.
| Modifier and Type | Method and Description |
|---|---|
static List<Angle> |
boundingBox(Set<PointOfInterest> pointsOfInterest)
Find latitude-longitude bounds for a set of points of interest (POIs).
|
static Set<PointOfInterest> |
inBoundingBox(Set<PointOfInterest> pointsOfInterest,
List<Angle> bounds)
Find points of interest (POIs) in a latitude-longitude bounding
rectangle.
|
public static List<Angle> boundingBox(Set<PointOfInterest> pointsOfInterest)
pointsOfInterest - set of POIs, not modified by this methodpublic static Set<PointOfInterest> inBoundingBox(Set<PointOfInterest> pointsOfInterest, List<Angle> bounds)
pointsOfInterest - set of POIs, not modified by this methodbounds - a latitude-longitude bounding rectangle as defined in the
documentation for this class, not modified by this method