Node

public final class Node
extension AVLTree.Node: Equatable where Value: Equatable

Node for an AVLTree which contains a key, and value, along with the left and right child nodes (if they exist), as well as its height.

Key and Value

  • key

    The key used to keep this node sorted within an AVLTree.

    Declaration

    Swift

    public var key: Key
  • The payload contained herein.

    Declaration

    Swift

    public var value: Value

Child nodes

  • The node storing values with keys less than this one.

    Declaration

    Swift

    public var left: AVLTree<Key, Value>.Node?
  • The node storing values with keys greater than this one.

    Declaration

    Swift

    public var right: AVLTree<Key, Value>.Node?

Position

  • The height of this node within an AVLTree.

    Declaration

    Swift

    public var height: Int

Initializers

Equatable

  • Declaration

    Swift

    public static func == (lhs: AVLTree.Node, rhs: AVLTree.Node) -> Bool

    Return Value

    true if the two given AVLTree.Node values are equivalent. Otherwise, nil.