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.
11 12 13 |
# File 'lib/flat_kit/sentinel_leaf_node.rb', line 11 def next_level @next_level end |
Instance Method Details
#<=>(other) ⇒ Object
A sentinal node is always greater than any other node
34 35 36 37 38 |
# File 'lib/flat_kit/sentinel_leaf_node.rb', line 34 def <=>(other) return 0 if other.sentinel? 1 end |
#finished? ⇒ Boolean
25 26 27 |
# File 'lib/flat_kit/sentinel_leaf_node.rb', line 25 def finished? true end |
#leaf? ⇒ Boolean
17 18 19 |
# File 'lib/flat_kit/sentinel_leaf_node.rb', line 17 def leaf? true end |
#next ⇒ Object
21 22 23 |
# File 'lib/flat_kit/sentinel_leaf_node.rb', line 21 def next nil end |
#sentinel? ⇒ Boolean
13 14 15 |
# File 'lib/flat_kit/sentinel_leaf_node.rb', line 13 def sentinel? true end |
#value ⇒ Object
29 30 31 |
# File 'lib/flat_kit/sentinel_leaf_node.rb', line 29 def value nil end |