GeoCollection Class
- java.
lang. Object - com.
azure. core. models. GeoObject - com.
azure. core. models. GeoCollection
- com.
- com.
public final class GeoCollection
extends GeoObject
Represents a heterogeneous collection of GeoObject.
This class encapsulates a list of geometry objects and provides methods to access these objects. The objects can be of any type that extends GeoObject.
This class is useful when you want to work with a collection of geometry objects in a read-only manner. For example, you can use it to represent a complex geographic feature that is composed of multiple simple geographic features.
Constructor Summary
| Constructor | Description |
|---|---|
| GeoCollection(List<GeoObject> geometries) |
Constructs a GeoCollection. |
| GeoCollection(List<GeoObject> geometries, GeoBoundingBox boundingBox, Map<String,Object> customProperties) |
Constructs a GeoCollection. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| boolean | equals(Object obj) |
|
static
Geo |
fromJson(JsonReader jsonReader)
Reads a JSON stream into a GeoCollection. |
|
List<Geo |
getGeometries()
Unmodifiable representation of the GeoObject contained in this collection. |
|
Geo |
getType()
Gets the GeoJSON type for this object. |
| int | hashCode() |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from GeoObject
Methods inherited from java.lang.Object
Constructor Details
GeoCollection
public GeoCollection(List<GeoObject> geometries)
Constructs a GeoCollection.
Parameters:
GeoCollection
public GeoCollection(List<GeoObject> geometries, GeoBoundingBox boundingBox, Map<String,Object> customProperties)
Constructs a GeoCollection.
Parameters:
Method Details
equals
public boolean equals(Object obj)
Overrides:
GeoCollection.equals(Object obj)Parameters:
fromJson
public static GeoCollection fromJson(JsonReader jsonReader)
Reads a JSON stream into a GeoCollection.
Parameters:
Returns:
Throws:
getGeometries
getType
public GeoObjectType getType()
Gets the GeoJSON type for this object.
Overrides:
GeoCollection.getType()hashCode
public int hashCode()
Overrides:
GeoCollection.hashCode()toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
GeoCollection.toJson(JsonWriter jsonWriter)Parameters:
Throws: