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
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
274
275
276
|
# File 'lib/strokedb/data_structures/skiplist.rb', line 274
def <(key)
true
end
|
277
278
279
|
# File 'lib/strokedb/data_structures/skiplist.rb', line 277
def <=(key)
true
end
|
280
281
282
|
# File 'lib/strokedb/data_structures/skiplist.rb', line 280
def to_s
"head(#{level})"
end
|