StructureData

open class StructureData : ObjectBase

A fixed-length mutable array of item type DataValue?.

  • An immutable empty StructureData.

    Declaration

    Swift

    nonisolated(unsafe) public static let empty: StructureData
  • Construct a new list with specified length.

    Declaration

    Swift

    public init(length: Int)

    Parameters

    length

    Fixed number of array items (initially nil).

  • Throws

    Fatal exception if index is out of range (0 to length - 1).

    Declaration

    Swift

    @inline(__always)
    public final func item(at index: Int) -> DataValue?

    Parameters

    index

    Zero-based index.

    Return Value

    The item in this list at the specified index.

  • The number of items in this array.

    Declaration

    Swift

    @inline(__always)
    public final var length: Int { get }
  • Set the item in this list at the specified index.

    Throws

    Fatal exception if index is out of range (0 to length - 1).

    Declaration

    Swift

    @inline(__always)
    public final func update(at index: Int, item value: DataValue?)

    Parameters

    index

    Zero-based index.

    value

    Item value.