Class Multipart

  • All Implemented Interfaces:
    JsonSerializable
    Direct Known Subclasses:
    Polygon, Polyline

    public abstract class Multipart
    extends Geometry
    Represents geometries composed of a collection of Parts, each Part being a collection of Segments.

    Multipart is an abstract class from which the Polygon and Polyline instantiable classes inherit. The getParts() method returns the immutable collection of parts that compose the Multipart geometry. Each part is independent of the others, but rules exist for different types of multipart. Using simplify 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 Detail

      • getParts

        public ImmutablePartCollection getParts()
        Gets the immutable collection of parts that compose this Multipart geometry. Use this collection to iterate through the ImmutableParts, 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