Class Multipart
 java.lang.Object

 com.esri.arcgisruntime.geometry.Geometry

 com.esri.arcgisruntime.geometry.Multipart

 All Implemented Interfaces:
JsonSerializable
public abstract class Multipart extends Geometry
Defines common members for polyline and polygon multipart geometries.Multipart geometry is comprised of a collection of shapes (of the same type) that is managed as a single geometry. A classic example is a set of islands that represent a single country or state. The individual island shapes are distinct, but ArcGIS considers it a single geometry.
Polygon
andPolyline
inherit fromMultipart
, which in turn inherits fromGeometry
.Multipart
provides access to the geometry'sImmutablePartCollection
: use thegetParts()
method to return the immutable collection of parts that compose theMultipart
geometry. EachImmutablePart
in the collection is a collection ofSegment
objects. You can iterate through the segments or points in each part.In the same way as
Polygon
andPolyline
are immutable, their multipart collections are also immutable:ImmutablePartCollection
,ImmutablePart
, andImmutablePointCollection
.Each part is independent of the others, but rules exist for different types of multipart. Using
GeometryEngine.simplify(Geometry)
creates a copy of the shape that obeys the rules of topological simplicity for that geometry type. Since:
 100.0.0
 See Also:
MultipartBuilder
,Polygon
,Polyline
,ImmutablePartCollection


Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutablePartCollection
getParts()
Gets the immutable collection of parts that compose this Multipart geometry.
Methods inherited from class com.esri.arcgisruntime.geometry.Geometry
equals, equals, fromJson, fromJson, getDimension, getExtent, getGeometryType, getSpatialReference, getUnknownJson, getUnsupportedJson, hasCurves, hashCode, hasM, hasZ, isEmpty, toJson




Method Detail

getParts
public ImmutablePartCollection getParts()
Gets the immutable collection of parts that compose this Multipart geometry. Use this collection to iterate through theImmutableParts
, and in turn the Segments or Points, that describe the shape of this geometry.If the geometry
Geometry.isEmpty()
, this method returns an empty collection. Returns:
 an ImmutablePartCollection of the Parts of this Multipart
 Since:
 100.0.0

