Class: StrokeDB::Skiplist::HeadNode

Inherits:
Node show all
Defined in:
lib/strokedb/data_structures/skiplist.rb

Instance Attribute Summary

Attributes inherited from Node

#_serialized_index, #forward, #key, #timestamp, #value

Instance Method Summary collapse

Methods inherited from Node

#free, #level, #next

Constructor Details

#initializeHeadNode

Returns a new instance of HeadNode.



271
272
273
# File 'lib/strokedb/data_structures/skiplist.rb', line 271

def initialize
	super 1, nil, nil
end

Instance Method Details

#<(key) ⇒ Object



274
275
276
# File 'lib/strokedb/data_structures/skiplist.rb', line 274

def <(key)
 true
end

#<=(key) ⇒ Object



277
278
279
# File 'lib/strokedb/data_structures/skiplist.rb', line 277

def <=(key)
 true
end

#to_sObject



280
281
282
# File 'lib/strokedb/data_structures/skiplist.rb', line 280

def to_s
  "head(#{level})"
end