Method: Puppet::Graph::RbTreeMap#has_key?
- Defined in:
- lib/puppet/graph/rb_tree_map.rb
#has_key?(key) ⇒ Boolean
Return true if key is found in the TreeMap, false otherwise
Complexity: O(log n)
map = Containers::TreeMap.new
map.push("MA", "Massachusetts")
map.push("GA", "Georgia")
map.has_key?("GA") #=> true
map.has_key?("DE") #=> false
71 72 73 |
# File 'lib/puppet/graph/rb_tree_map.rb', line 71 def has_key?(key) !get_recursive(@root, key).nil? end |