# MultiPointCoordinates

``open class MultiPointCoordinates: ListBase, Sequence``

A list of item type `PointCoordinates`.

• ``` subscript(_:) ```

Undocumented

#### Declaration

Swift

``public subscript(index: Int) -> PointCoordinates``
• ``` empty ```

An immutable empty `MultiPointCoordinates`.

#### Declaration

Swift

``public static let empty: MultiPointCoordinates = MultiPointCoordinates(capacity: Int(Int32.min))``
• ``` init(capacity:) ```

Construct a new list with `length` of zero and optional initial `capacity`. A list can expand in length beyond its initial capacity, but best performance will be obtained if the initial capacity is close to the list’s maximum length.

#### Declaration

Swift

``override public init(capacity: Int = (4 as Int))``

#### Parameters

 ``` capacity ``` Optional initial capacity.
• ``` append(_:) ```

Add `item` to the end of this list.

#### Declaration

Swift

``open func append(_ item: PointCoordinates) -> Void``

#### Parameters

 ``` item ``` Item to be added.
• ``` append(contentsOf:) ```

Add all the items of `list` to the end of this list.

#### Declaration

Swift

``open func append(contentsOf list: MultiPointCoordinates) -> Void``

#### Parameters

 ``` list ``` Items to be added.
• ``` copy() ```

#### Declaration

Swift

``open func copy() -> MultiPointCoordinates``

#### Return Value

A shallow copy of this list.

• ``` first() ```

Throws

`EmptyListException` if the list is empty.

#### Declaration

Swift

``open func first() -> PointCoordinates``

#### Return Value

The first item in this list.

• ``` fromArray(_:) ```

Convert array to list.

#### Declaration

Swift

``open class func fromArray(_ array: Array<PointCoordinates>) -> MultiPointCoordinates``

#### Parameters

 ``` array ``` Array with source items.

#### Return Value

New list with items copied from `array` parameter.

• ``` includes(item:) ```

#### Declaration

Swift

``open func includes(item: PointCoordinates) -> Bool``

#### Parameters

 ``` item ``` Item for comparison. Comparison uses the `equality` property, which would usually be expected to match the `==` operator for item type `PointCoordinates`.

#### Return Value

`true` if this list contains `item`.

• ``` indexOf(item:start:) ```

#### Declaration

Swift

``open func indexOf(item: PointCoordinates, start: Int = (0 as Int)) -> Int``

#### Parameters

 ``` item ``` Item for comparison. Comparison uses the `equality` property, which would usually be expected to match the `==` operator for item type `PointCoordinates`. ``` start ``` Zero-based starting index (search moves forwards from this index).

#### Return Value

First index in this list of `item`, or `-1` if not found.

• ``` insert(at:item:) ```

Insert `item` into this list, before the item (if any) at `index`.

Throws

`ListIndexException` if `index` is out of range (0 to `length`).

#### Declaration

Swift

``open func insert(at index: Int, item: PointCoordinates) -> Void``

#### Parameters

 ``` index ``` Zero-based index. ``` item ``` Item to be added.
• ``` insert(at:contentsOf:) ```

Insert all items of `list` into this list, before the item (if any) at `index`.

Throws

`ListIndexException` if `index` is out of range (0 to `length`).

#### Declaration

Swift

``open func insert(at index: Int, contentsOf list: MultiPointCoordinates) -> Void``

#### Parameters

 ``` index ``` Zero-based index. ``` list ``` List of items to be inserted.
• ``` item(at:) ```

Throws

`ListIndexException` if `index` is out of range (0 to `length` - 1).

#### Declaration

Swift

``open func item(at index: Int) -> PointCoordinates``

#### Parameters

 ``` index ``` Zero-based index.

#### Return Value

The item in this list at the specified `index`.

• ``` last() ```

Throws

`EmptyListException` if the list is empty.

#### Declaration

Swift

``open func last() -> PointCoordinates``

#### Return Value

The last item in this list.

• ``` lastIndexOf(item:start:) ```

#### Declaration

Swift

``open func lastIndexOf(item: PointCoordinates, start: Int = (2147483647 as Int)) -> Int``

#### Parameters

 ``` item ``` Item for comparison. Comparison uses the `equality` property, which would usually be expected to match the `==` operator for item type `PointCoordinates`. ``` start ``` Zero-based starting index (search moves backwards from this index).

#### Return Value

Last index in this list of `item`, or `-1` if not found.

• ``` makeIterator() ```

#### Declaration

Swift

``open func makeIterator() -> IndexingIterator<Array<PointCoordinates>>``

#### Return Value

This list converted to a Swift iterator.

• ``` share(_:) ```

Return a new `MultiPointCoordinates` that shares the `ListBase.untypedList` as the `list` parameter. To ensure type safety, items in `list` that do not have the item type `PointCoordinates` will be removed.

#### Declaration

Swift

``open class func share(_ list: ListBase) -> MultiPointCoordinates``

#### Parameters

 ``` list ``` List whose items will be shared by the resulting list.

#### Return Value

A new list of item type `PointCoordinates`, sharing the same items as `list`.

• ``` single() ```

Throws

`EmptyListException` if the list has no items, `NotUniqueException` if the list has multiple items.

#### Declaration

Swift

``open func single() -> PointCoordinates``

#### Return Value

A single item from this list.

• ``` slice(start:end:) ```

#### Declaration

Swift

``open func slice(start: Int, end: Int = (2147483647 as Int)) -> MultiPointCoordinates``

#### Parameters

 ``` start ``` Zero-based starting index (inclusive), or negative for starting index relative to the end of this list. ``` end ``` Zero-based ending index (exclusive), or negative for ending index relative to the end of this list.

#### Return Value

A slice of this list from index `start` (inclusive) to index `end` (exclusive).

• ``` toArray() ```

Convert list to array.

#### Declaration

Swift

``open func toArray() -> Array<PointCoordinates>``

#### Return Value

New array with items copied from this list.

• ``` update(at:item:) ```

Set the item in this list at the specified `index`.

#### Declaration

Swift

``open func update(at index: Int, item: PointCoordinates) -> Void``

#### Parameters

 ``` index ``` Zero-based index. ``` item ``` Item value.