Skip to content

InMemoryNode

ratranqu edited this page Apr 7, 2021 · 2 revisions

InMemoryNode

public final class InMemoryNode<Key: Comparable & Codable & DataProtocol & InitialisableProtocol, Value: Codable & DataProtocol & InitialisableProtocol, Hasher: HasherProtocol>: NodeProtocol

Inheritance

NodeProtocol

Nested Type Aliases

Hash

public typealias Hash = Hasher.Hash

Initializers

init(key:value:version:)

public required init(key: Key, value: Value, version: Int64)

init(key:left:right:version:)

public required init(key: Key, left: InMemoryNode<Key, Value, Hasher>, right: InMemoryNode<Key, Value, Hasher>, version: Int64)

Properties

key

var key: Key

version

let version: Int64

hash

let hash: Hash

isEmpty

var isEmpty: Bool

value

var value: Value?

inner

var inner: (height: Int8, size: Int64, left: InMemoryNode<Key, Value, Hasher>, right: InMemoryNode<Key, Value, Hasher>)?

description

var description: String

Methods

empty()

public static func empty() -> InMemoryNode<Key, Value, Hasher>