Class: FlatKit::SentinelLeafNode
- Inherits:
-
Object
- Object
- FlatKit::SentinelLeafNode
- Includes:
- Comparable
- Defined in:
- lib/flat_kit/sentinel_leaf_node.rb
Overview
Private: The Sentinel Leaf Node is used internally by the MergeTree
This class represents a LeafNode that has no more data
Instance Attribute Summary collapse
-
#next_level ⇒ Object
Returns the value of attribute next_level.
Instance Method Summary collapse
-
#<=>(other) ⇒ Object
A sentinal node is always greater than any other node.
- #finished? ⇒ Boolean
- #leaf? ⇒ Boolean
- #next ⇒ Object
- #sentinel? ⇒ Boolean
- #value ⇒ Object
Instance Attribute Details
#next_level ⇒ Object
Returns the value of attribute next_level.
9 10 11 |
# File 'lib/flat_kit/sentinel_leaf_node.rb', line 9 def next_level @next_level end |
Instance Method Details
#<=>(other) ⇒ Object
A sentinal node is always greater than any other node
32 33 34 35 |
# File 'lib/flat_kit/sentinel_leaf_node.rb', line 32 def <=>(other) return 0 if other.sentinel? return 1 end |
#finished? ⇒ Boolean
23 24 25 |
# File 'lib/flat_kit/sentinel_leaf_node.rb', line 23 def finished? true end |
#leaf? ⇒ Boolean
15 16 17 |
# File 'lib/flat_kit/sentinel_leaf_node.rb', line 15 def leaf? true end |
#next ⇒ Object
19 20 21 |
# File 'lib/flat_kit/sentinel_leaf_node.rb', line 19 def next nil end |
#sentinel? ⇒ Boolean
11 12 13 |
# File 'lib/flat_kit/sentinel_leaf_node.rb', line 11 def sentinel? true end |
#value ⇒ Object
27 28 29 |
# File 'lib/flat_kit/sentinel_leaf_node.rb', line 27 def value nil end |