com.mapinfo.midev.geometry

## Class MultiPointBuilder

- java.lang.Object
- - com.mapinfo.midev.geometry.MultiPointBuilder

    public class MultiPointBuilder
    extends Object

A builder to create new `IMultiPoint` instances.

### Method Summary

All Methods Instance Methods Concrete Methods
`IMultiPoint` `build()` Creates a new multi-point from all points previously added to this builder with `MultiPointBuilder.withPoint(DirectPosition)`.
`MultiPointBuilder` `withPoint(DirectPosition position)` Adds a new point to the multi-point created by this builder.
`MultiPointBuilder` `withPoint(double x, double y)` Adds a new point to the multi-point created by this builder.
`MultiPointBuilder` `withPoint(String x, String y)` Adds a new point to the multi-point created by this builder.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### withPoint

    public MultiPointBuilder withPoint(DirectPosition position)

Adds a new point to the multi-point created by this builder.

Parameters:
  `position` - the coordinates of the point to be added
Returns:
  this builder instance

#### withPoint

    public MultiPointBuilder withPoint(double x,
                                       double y)

Adds a new point to the multi-point created by this builder.

Parameters:
  `x` - the x coordinate of the point to be added
  `y` - the y coordinate of the point to be added
Returns:
  this builder instance

#### withPoint

    public MultiPointBuilder withPoint(String x,
                                       String y)

Adds a new point to the multi-point created by this builder.

Parameters:
  `x` - the x coordinate of the point to be added
  `y` - the y coordinate of the point to be added
Returns:
  this builder instance
Throws:
  `NumberFormatException` - if any of the coordinate values cannot be parsed into a double value
  `NullPointerException` - if any of the coordinate values is `null`.

#### build

    public IMultiPoint build()

Creates a new multi-point from all points previously added to this builder with `MultiPointBuilder.withPoint(DirectPosition)`.

Returns:
  a new multi-point instance.