Skip To Content ArcGIS for Developers Sign In Dashboard

ImmutablePartCollection Class


Represents an immutable collection of Parts that compose a Multipart geometry (Polygon or Polyline). More...

Header: #include <ImmutablePartCollection>
Since: Esri::ArcGISRuntime 100.0
Inherits: Iterable<ImmutablePart>

Public Functions

ImmutablePartCollection(const ImmutablePartCollection &other)
ImmutablePartCollection(ImmutablePartCollection &&other)
int indexOf(const ImmutablePart &part) const
bool isEmpty() const
ImmutablePart part(int index) const
int size() const
SpatialReference spatialReference() const
ImmutablePartCollection &operator=(const ImmutablePartCollection &other)
ImmutablePartCollection &operator=(ImmutablePartCollection &&other)

Detailed Description

Represents an immutable collection of Parts that compose a Multipart geometry (Polygon or Polyline).

Use the ImmutablePartCollection returned from the Multipart getParts method to iterate through all of the parts in a Multipart.

Because geometries themselves are immutable, the collections they are composed of are also immutable. For geometry editing or creation workflows, a mutable PartCollection is used instead. PartCollection has constructors that take an ImmutablePartCollection, allowing creation of new geometries from parts of existing ones.

Member Function Documentation


Default constructor.

ImmutablePartCollection::ImmutablePartCollection(const ImmutablePartCollection &other)

Copy constructor from other ImmutablePartCollection.

ImmutablePartCollection::ImmutablePartCollection(ImmutablePartCollection &&other)

Move constructor from other ImmutablePartCollection.



int ImmutablePartCollection::indexOf(const ImmutablePart &part) const

Gets the index of part in the collection.

Returns the index or -1 if not found.

bool ImmutablePartCollection::isEmpty() const

Gets whether the ImmutablePartCollection contains any parts.

Returns true if the ImmutablePartCollection contains parts.

ImmutablePart ImmutablePartCollection::part(int index) const

Gets the ImmutablePart at index.

Returns the ImmutablePart or an empty ImmutablePart on error.

int ImmutablePartCollection::size() const

Gets the number of parts in the ImmutablePartCollection.

Returns the number of parts.

SpatialReference ImmutablePartCollection::spatialReference() const

Gets the SpatialReference of the ImmutablePartCollection.

Returns the SpatialReference.

ImmutablePartCollection &ImmutablePartCollection::operator=(const ImmutablePartCollection &other)

Assignment operator from other ImmutablePartCollection.

ImmutablePartCollection &ImmutablePartCollection::operator=(ImmutablePartCollection &&other)

Move operator from other ImmutablePartCollection.

Feedback on this topic?