struct

PF2d::ThreadedBinaryTree(T)

Inherits Enumerable < Struct < Value < Object

Constructors

new(compare : T, T -> Int32, on_collision : Nil | T, T -> T)
Source

Instance methods

<<(value : T)
Source
clear
Source
compare
Source
compare=(compare : T, T -> Int32)
Source
each

Must yield this collection's elements to the block.

Source
first

Returns the first element in the collection. Raises Enumerable::EmptyError if the collection is empty.

([1, 2, 3]).first   # => 1
([] of Int32).first # raises Enumerable::EmptyError
Source
on_collision
Source
on_collision=(on_collision : T, T -> T | Nil)
Source
values
Source
values=(values : Array(Node(T)))
Source

Nested types