class Immutable::Map::Trie(K, V)

Included Modules

Defined in:

immutable/map/trie.cr

Constant Summary

BITMAP_MASK = ((2_u64 ** BLOCK_SIZE) - 1_u64)
BITS_PER_LEVEL = 5_u64
BLOCK_SIZE = 2_u64 ** BITS_PER_LEVEL
INDEX_MASK = BLOCK_SIZE - 1_u64

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(children : Array(Immutable::Map::Trie(K, V)), values : Immutable::Map::Trie::Values(K, V), bitmap : UInt64, levels : Int32, owner : UInt64? = nil) #

[View source]

Class Method Detail

def self.empty(owner : UInt64? = nil) #

[View source]

Instance Method Detail

def clear_owner! #

[View source]
def delete(key : K) : Immutable::Map::Trie(K, V) #

[View source]
def delete!(key : K, from : UInt64) : Immutable::Map::Trie(K, V) #

[View source]
def each(&block) #

[View source]
def each #

[View source]
def empty? #

[View source]
def fetch(key : K, &block : K -> _) #

[View source]
def find_entry(key : K) : Immutable::Map::Trie::Entry(K, V)? #

[View source]
def get(key : K) : V #

[View source]
def has_key?(key : K) : Bool #

[View source]
def levels #

[View source]
def set(key : K, value : V) : Immutable::Map::Trie(K, V) #

[View source]
def set!(key : K, value : V, from : UInt64) : Immutable::Map::Trie(K, V) #

[View source]
def size #

[View source]