Package com.azure.core.models
Class GeoBoundingBox
java.lang.Object
com.azure.core.models.GeoBoundingBox
- All Implemented Interfaces:
com.azure.json.JsonSerializable<GeoBoundingBox>
public final class GeoBoundingBox
extends Object
implements com.azure.json.JsonSerializable<GeoBoundingBox>
Represents a geometric bounding box.
-
Constructor Summary
ConstructorsConstructorDescriptionGeoBoundingBox(double west, double south, double east, double north) Constructs a bounding box.GeoBoundingBox(double west, double south, double east, double north, double minAltitude, double maxAltitude) Constructs a bounding box. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic GeoBoundingBoxfromJson(com.azure.json.JsonReader jsonReader) Reads a JSON stream into aGeoBoundingBox.doublegetEast()The east longitudinal boundary of the bounding box.The maximum altitude boundary of the bounding box.The minimum altitude boundary of the bounding box.doublegetNorth()The north latitudinal boundary of the bounding box.doublegetSouth()The south latitudinal boundary of the bounding box.doublegetWest()The west longitudinal boundary of the bounding box.inthashCode()com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Writes the object to the passedJsonWriter.toString()
-
Constructor Details
-
GeoBoundingBox
public GeoBoundingBox(double west, double south, double east, double north) Constructs a bounding box.- Parameters:
west- West longitudinal boundary.south- South latitudinal boundary.east- East longitudinal boundary.north- North latitudinal boundary.
-
GeoBoundingBox
public GeoBoundingBox(double west, double south, double east, double north, double minAltitude, double maxAltitude) Constructs a bounding box.- Parameters:
west- West longitudinal boundary.south- South latitudinal boundary.east- East longitudinal boundary.north- North latitudinal boundary.minAltitude- Minimum altitude boundary.maxAltitude- Maximum altitude boundary.
-
-
Method Details
-
getWest
public double getWest()The west longitudinal boundary of the bounding box.- Returns:
- The west longitudinal boundary.
-
getSouth
public double getSouth()The south latitudinal boundary of the bounding box.- Returns:
- The south latitudinal boundary.
-
getEast
public double getEast()The east longitudinal boundary of the bounding box.- Returns:
- The east longitudinal boundary.
-
getNorth
public double getNorth()The north latitudinal boundary of the bounding box.- Returns:
- The north latitudinal boundary.
-
getMinAltitude
The minimum altitude boundary of the bounding box.- Returns:
- The minimum altitude boundary.
-
getMaxAltitude
The maximum altitude boundary of the bounding box.- Returns:
- The maximum altitude boundary.
-
hashCode
public int hashCode() -
equals
-
toString
-
toJson
Description copied from interface:com.azure.json.JsonSerializableWrites the object to the passedJsonWriter.The contract for writing JSON to
JsonWriteris that the object being written will handle opening and closing its own JSON object. So, for objects calling out to otherJsonSerializableobjects for serialization, they'll write the field name only then pass theJsonWriterto the otherJsonSerializableobject. This way objects writing JSON will be self-encapsulated for writing properly formatted JSON.- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<GeoBoundingBox>- Parameters:
jsonWriter- Where the object's JSON will be written.- Returns:
- The
JsonWriterwhere the JSON was written. - Throws:
IOException- If the object fails to be written to thejsonWriter.
-
fromJson
Reads a JSON stream into aGeoBoundingBox.- Parameters:
jsonReader- TheJsonReaderbeing read.- Returns:
- The
GeoBoundingBoxthat the JSON stream represented, or null if it pointed to JSON null. - Throws:
IllegalStateException- If theGeoBoundingBoxdoesn't have four or six positions in the array.IOException- If aGeoBoundingBoxfails to be read from thejsonReader.
-