ItemIndex

public struct ItemIndex : Hashable, Comparable

Undocumented

  • The hierarchy index for the parent of this index reference.

    Declaration

    Swift

    public var parent: HierarchyIndex
  • The index of the item.

    Declaration

    Swift

    public var index: Int
  • Undocumented

    Declaration

    Swift

    public init(parent: HierarchyIndex, index: Int)
  • Gets this item index as a hierarchy index.

    Declaration

    Swift

    public var asHierarchyIndex: HierarchyIndex { get }
  • Returns true if this item belongs to a given hierarchy index.

    Declaration

    Swift

    public func isChild(of hierarchy: HierarchyIndex) -> Bool
  • Returns true if lhs comes before in a hierarchy compared to rhs.

    An item index comes before another if its hierarchical parent compares lower to the other item’s, or, if the hierarchical parent is the same, if index compares lower.

    Declaration

    Swift

    public static func < (lhs: `Self`, rhs: `Self`) -> Bool