Class BoundingBox
- java.lang.Object
-
- com.ibm.fhir.search.location.bounding.Bounding
-
- com.ibm.fhir.search.location.bounding.BoundingBox
-
public class BoundingBox extends Bounding
The maximum number of BoundedBoxes for a single coordinate is 4.
lat = 90,-90, long = 180, -180 with any boundary the result is 4 Bounded Boxes.
The bounded boxes must adhere to the following constraints:
There are four points. Latitude: 90 to 0 to -90
Longitude: 180 to 0 -180
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BoundingBox.Builder
Builds the BoundingBox.
-
Field Summary
Fields Modifier and Type Field Description java.lang.Double
maxLatitude
java.lang.Double
maxLongitude
java.lang.Double
minLatitude
java.lang.Double
minLongitude
-
Constructor Summary
Constructors Constructor Description BoundingBox()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BoundingBox.Builder
builder()
java.util.List<java.lang.Double>
getDataPoints()
gets the coordinates in an ordered listjava.lang.Double
getMaxLatitude()
java.lang.Double
getMaxLongitude()
java.lang.Double
getMinLatitude()
java.lang.Double
getMinLongitude()
BoundingType
getType()
returns the bounding type - radius or box.protected void
setMaxLatitude(java.lang.Double maxLatitude)
protected void
setMaxLongitude(java.lang.Double maxLongitude)
protected void
setMinLatitude(java.lang.Double minLatitude)
protected void
setMinLongitude(java.lang.Double minLongitude)
java.lang.String
toString()
void
validate()
validates the Longitude and Latitude is valid for the Bounding area.-
Methods inherited from class com.ibm.fhir.search.location.bounding.Bounding
instance, setInstance
-
-
-
-
Method Detail
-
getMinLatitude
public java.lang.Double getMinLatitude()
-
getMaxLatitude
public java.lang.Double getMaxLatitude()
-
getMinLongitude
public java.lang.Double getMinLongitude()
-
getMaxLongitude
public java.lang.Double getMaxLongitude()
-
setMinLatitude
protected void setMinLatitude(java.lang.Double minLatitude)
-
setMaxLatitude
protected void setMaxLatitude(java.lang.Double maxLatitude)
-
setMinLongitude
protected void setMinLongitude(java.lang.Double minLongitude)
-
setMaxLongitude
protected void setMaxLongitude(java.lang.Double maxLongitude)
-
validate
public void validate()
Description copied from class:Bounding
validates the Longitude and Latitude is valid for the Bounding area.
-
getDataPoints
public java.util.List<java.lang.Double> getDataPoints()
Description copied from class:Bounding
gets the coordinates in an ordered list- Specified by:
getDataPoints
in classBounding
- Returns:
-
getType
public BoundingType getType()
Description copied from class:Bounding
returns the bounding type - radius or box.
-
builder
public static BoundingBox.Builder builder()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-