 Direct Known Subclasses:
PolygonBuilder
,PolylineBuilder
Polyline
and Polygon
.
MultipartBuilder is not a concrete class  create instances of PolygonBuilder
or PolylineBuilder
instead.
 Since:
 100.0.0

Method Summary
Modifier and TypeMethodDescriptionvoid
addPart()
Adds a new empty Part to the end of the PartCollection of this builder.void
Adds the given Part to the end of the PartCollection of this builder.void
addPart
(PointCollection points) Creates a new Part at the end of the PartCollection of this builder, and adds the given PointCollection to this new Part.void
addParts
(PartCollection parts) Adds the Parts in the given PartCollection to the end of the PartCollection of this builder.void
addPoint
(double x, double y) Adds a new Point with the given x,y coordinates to the end of the last Part of this builders PartCollection.void
addPoint
(double x, double y, double z) Adds a new Point with the given x,y coordinates and z value to the end of the last Part of this builders PartCollection.void
Adds the given Point to the end of the last Part of this builders PartCollection.void
Adds the given set of Points to the end of the last Part of this builders PartCollection.void
addPointsToPart
(int partIndex, Iterable<Point> points) Adds the given set of Points to the end of the given Part of this builders PartCollection.void
addPointToPart
(int partIndex, Point point) Adds the given Point to the end of the given Part of this builders PartCollection.getParts()
Gets the collection of Parts that will be used to create a multipart geometry.void
replaceGeometry
(Geometry geometry) Replaces the geometry currently stored in this builder with the new geometry.Methods inherited from class com.esri.arcgisruntime.geometry.GeometryBuilder
create, create, getBuilderType, getExtent, getSpatialReference, hasCurves, hasM, hasZ, isEmpty, isSketchValid, toGeometry

Method Details

getParts
Gets the collection of Parts that will be used to create a multipart geometry. Use this mutable PartCollection to iterate through the contents of the builder. Also use this to change the state of the builder, calling the methods on this PartCollection to add, insert, or remove Parts from the builder, or to change the contents of an existing Part. This method always returns a valid collection object; the collection will be empty if the builderGeometryBuilder.isEmpty()
. By default, a new MultipartBuilder has one empty Part. Returns:
 the collection of Parts that will be used to build a multipart geometry
 Since:
 100.0.0
 See Also:

addPart
public void addPart()Adds a new empty Part to the end of the PartCollection of this builder. Subsequent calls to any of theaddPoint
methods will append the new Point to the last Part in the builder.This is a convenience method providing a shortcut alternative to using
getParts()
and thenPartCollection.add(Part)
. Since:
 100.0.0
 See Also:

addPart
Adds the given Part to the end of the PartCollection of this builder. The new Part may already contain members, or alternatively, the Part can be updated after it is added to the builder.This is a convenience method providing a shortcut alternative to using
getParts()
and thenPartCollection.add(Part)
. Parameters:
part
 the new Part to add to the builder Throws:
NullPointerException
 ifpart
is null Since:
 100.0.0
 See Also:

addPart
Creates a new Part at the end of the PartCollection of this builder, and adds the given PointCollection to this new Part.This is a convenience method providing a shortcut alternative to using
getParts()
and thenPartCollection.add(PointCollection)
. Parameters:
points
 the new part to add to the builder Throws:
NullPointerException
 ifpoints
is null Since:
 100.0.0
 See Also:

addParts
Adds the Parts in the given PartCollection to the end of the PartCollection of this builder. The new Parts may already contain members, or alternatively, can be updated after being added to the builder.This is a convenience method providing a shortcut alternative to using
getParts()
and thenPartCollection.add(Part)
. Parameters:
parts
 the new PartCollection containing Parts to add to the builder Throws:
NullPointerException
 ifpart
is null Since:
 100.0.0
 See Also:

addPoint
public void addPoint(double x, double y) Adds a new Point with the given x,y coordinates to the end of the last Part of this builders PartCollection.This is a pointbased helper method, working with a multipart geometry using Points instead of Segments. It is also a convenience method providing a shortcut alternative to using
getParts()
, and thenPart.addPoint(double, double)
.If there are no parts, then an initial part is created and the point added to that. The point will become the endpoint of a line segment in the part.
 Parameters:
x
 the x coordinate of the new Pointy
 the y coordinate of the new Point Since:
 100.0.0
 See Also:

addPoint
public void addPoint(double x, double y, double z) Adds a new Point with the given x,y coordinates and z value to the end of the last Part of this builders PartCollection.This is a pointbased helper method, working with a multipart geometry using Points instead of Segments. It is also a convenience method providing a shortcut alternative to using
getParts()
, and thenPart.addPoint(double, double, double)
.If there are no parts, then an initial part is created and the point added to that. The point will become the endpoint of a line segment in the part.
 Parameters:
x
 the x coordinate of the new Pointy
 the y coordinate of the new Pointz
 the z value of the new Point Since:
 100.0.0
 See Also:

addPoint
Adds the given Point to the end of the last Part of this builders PartCollection.This is a pointbased helper method, working with a multipart geometry using Points instead of Segments. It is also a convenience method providing a shortcut alternative to using
getParts()
, and thenPart.addPoint(Point)
.If there are no parts, then an initial part is created and the point added to that. The point will become the endpoint of a line segment in the part.
 Parameters:
point
 the Point to add to the builder Throws:
NullPointerException
 ifpoint
is null Since:
 100.0.0
 See Also:

addPointToPart
Adds the given Point to the end of the given Part of this builders PartCollection. To insert a Point at an index position other than the end of the Part, usegetParts()
to get the required Part, andPart.addPoint(int, Point)
instead.This is a pointbased helper method, working with a multipart geometry using Points instead of Segments.
 Parameters:
partIndex
 index of the Part to add the given Point topoint
 the Point to add to the given Part of the builder Throws:
IndexOutOfBoundsException
 ifpartIndex
< 0 partIndex
>= size()NullPointerException
 ifpoint
is null Since:
 100.0.0
 See Also:

addPoints
Adds the given set of Points to the end of the last Part of this builders PartCollection. To add Points to a Part other than the last Part, usegetParts()
to get the required Part, andPart.addAllPoints(int, Collection)
instead.This is a pointbased helper method, working with a multipart geometry using Points instead of Segments.
 Parameters:
points
 the Points to the end of the last Part of the builder Throws:
NullPointerException
 ifpoints
is null Since:
 100.0.0
 See Also:

addPointsToPart
Adds the given set of Points to the end of the given Part of this builders PartCollection. To insert Points at an index position other than the end of the Part, usegetParts()
to get the required Part, andPart.addAllPoints(int, Collection)
instead.This is a pointbased helper method, working with a multipart geometry using Points instead of Segments.
 Parameters:
partIndex
 index of the Part to add the given Points topoints
 the Points to the end of the given Part of the builder Throws:
IndexOutOfBoundsException
 ifpartIndex
< 0 partIndex
>= size()NullPointerException
 ifpoints
is null Since:
 100.0.0
 See Also:

replaceGeometry
Description copied from class:GeometryBuilder
Replaces the geometry currently stored in this builder with the new geometry. This method can be used as an alternative to creating a new builder instance from an existing geometry.This does not update the spatial reference of the builder. If the geometry is null, the builder is cleared.
Prior to v100.12, only geometries without curves could be used; passing in a geometry where
Geometry.hasCurves()
is true would throw an exception.From v100.12, geometries with curves are supported.
 Overrides:
replaceGeometry
in classGeometryBuilder
 Parameters:
geometry
 the new geometry to replace the existing geometry with
