Package com.azure.core.models
Class GeoLineStringCollection
java.lang.Object
com.azure.core.models.GeoObject
com.azure.core.models.GeoLineStringCollection
- All Implemented Interfaces:
com.azure.json.JsonSerializable<GeoObject>
Represents a collection of GeoLineStrings.
This class encapsulates a list of GeoLineString instances that form a collection of lines. Each line
string is a curve with linear interpolation between points.
This class is useful when you want to work with a collection of line strings in a geographic context. For example, you can use it to represent a complex route on a map that is composed of multiple line strings.
Note: A line string collection requires at least 2 coordinates for each line string.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGeoLineStringCollection(List<GeoLineString> lines) Constructs aGeoLineStringCollection.GeoLineStringCollection(List<GeoLineString> lines, GeoBoundingBox boundingBox, Map<String, Object> customProperties) Constructs aGeoLineStringCollection. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic GeoLineStringCollectionfromJson(com.azure.json.JsonReader jsonReader) Reads a JSON stream into aGeoLineStringCollection.getLines()Unmodifiable representation of thegeometric linesrepresenting this multi-line.getType()Gets the GeoJSON type for this object.inthashCode()com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class com.azure.core.models.GeoObject
getBoundingBox, getCustomPropertiesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
GeoLineStringCollection
Constructs aGeoLineStringCollection.- Parameters:
lines- The geometric lines that define the multi-line.- Throws:
NullPointerException- Iflinesisnull.
-
GeoLineStringCollection
public GeoLineStringCollection(List<GeoLineString> lines, GeoBoundingBox boundingBox, Map<String, Object> customProperties) Constructs aGeoLineStringCollection.- Parameters:
lines- The geometric lines that define the multi-line.boundingBox- Bounding box for the multi-line.customProperties- Additional properties of the multi-line.- Throws:
NullPointerException- Iflinesisnull.
-
-
Method Details
-
getLines
Unmodifiable representation of thegeometric linesrepresenting this multi-line.- Returns:
- An unmodifiable representation of the
geometric linesrepresenting this multi-line.
-
getType
Description copied from class:GeoObjectGets the GeoJSON type for this object. -
hashCode
public int hashCode() -
equals
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<GeoObject>- Overrides:
toJsonin classGeoObject- Throws:
IOException
-
fromJson
public static GeoLineStringCollection fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads a JSON stream into aGeoLineStringCollection.- Parameters:
jsonReader- TheJsonReaderbeing read.- Returns:
- The
GeoLineStringCollectionthat the JSON stream represented, or null if it pointed to JSON null. - Throws:
IllegalStateException- If thetypenode exists and isn't equal toMultiLineString.IOException- If aGeoLineStringCollectionfails to be read from thejsonReader.
-