class TreeMap::BoundedMap::BoundedNodeIterator
in-order traversal of nodes in tree
Public Class Methods
new(bounded_map, next_node)
click to toggle source
Calls superclass method
TreeMap::NodeIterator::new
# File lib/treemap/bounded_map.rb, line 340 def initialize(bounded_map, next_node) super(next_node) @bounded_map = bounded_map end
Public Instance Methods
step_backward()
click to toggle source
Calls superclass method
TreeMap::NodeIterator#step_backward
# File lib/treemap/bounded_map.rb, line 351 def step_backward result = super @next_node = nil if @next_node && !@bounded_map.in_closed_bounds?(@next_node.key, @bounded_map.from_bound, Bound::NO_BOUND) result end
step_forward()
click to toggle source
Calls superclass method
TreeMap::NodeIterator#step_forward
# File lib/treemap/bounded_map.rb, line 345 def step_forward result = super @next_node = nil if @next_node && !@bounded_map.in_closed_bounds?(@next_node.key, Bound::NO_BOUND, @bounded_map.to_bound) result end