Class: IntervalSkipList::HeadNode
- Inherits:
-
Object
- Object
- IntervalSkipList::HeadNode
- Defined in:
- lib/puppet_x/wildfly/gems/treetop-1.6.8/lib/treetop/runtime/interval_skip_list/head_node.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#forward ⇒ Object
readonly
Returns the value of attribute forward.
-
#forward_markers ⇒ Object
readonly
Returns the value of attribute forward_markers.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
Instance Method Summary collapse
-
#initialize(height) ⇒ HeadNode
constructor
A new instance of HeadNode.
- #top_level ⇒ Object
Constructor Details
#initialize(height) ⇒ HeadNode
Returns a new instance of HeadNode.
5 6 7 8 9 |
# File 'lib/puppet_x/wildfly/gems/treetop-1.6.8/lib/treetop/runtime/interval_skip_list/head_node.rb', line 5 def initialize(height) @height = height @forward = Array.new(height, nil) @forward_markers = Array.new(height) {|i| []} end |
Instance Attribute Details
#forward ⇒ Object (readonly)
Returns the value of attribute forward.
3 4 5 |
# File 'lib/puppet_x/wildfly/gems/treetop-1.6.8/lib/treetop/runtime/interval_skip_list/head_node.rb', line 3 def forward @forward end |
#forward_markers ⇒ Object (readonly)
Returns the value of attribute forward_markers.
3 4 5 |
# File 'lib/puppet_x/wildfly/gems/treetop-1.6.8/lib/treetop/runtime/interval_skip_list/head_node.rb', line 3 def forward_markers @forward_markers end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
3 4 5 |
# File 'lib/puppet_x/wildfly/gems/treetop-1.6.8/lib/treetop/runtime/interval_skip_list/head_node.rb', line 3 def height @height end |
Instance Method Details
#top_level ⇒ Object
11 12 13 |
# File 'lib/puppet_x/wildfly/gems/treetop-1.6.8/lib/treetop/runtime/interval_skip_list/head_node.rb', line 11 def top_level height - 1 end |