Class: Yk::EMMap
- Inherits:
-
Object
- Object
- Yk::EMMap
- Defined in:
- for_yard_product.rb
Overview
EMMaps are associative containers with external iterators that store elements formed by a combination of a key and a value, following a specific order, and where multiple elements can have equivalent keys. For use, 'Yk/ESet';include Yk;
Defined Under Namespace
Classes: Iterator
Class Method Summary collapse
-
.find(first, last, obj = nil) {|obj| ... } ⇒ EMMap::Iterator
Searches the container for an element with an object equivalent to the third argument and/or validated with the provided block in a range of elements ([first,last)), 'obj' and returns an iterator to it if found, otherwise it returns an iterator to .
-
.for_each(first, last) {|obj| ... } ⇒ Object
Applies given block to each of the elements in the range [first,last).
Instance Method Summary collapse
-
#begin ⇒ EMMap::Iterator
Return iterator to beginning.
-
#clear ⇒ Object
Clear content.
-
#end ⇒ EMMap::Iterator
Return iterator to end.
- #erase(*args) ⇒ Object
-
#find(arg) ⇒ EMMap::Iterator
Searches the container for an element with an object equivalent to the argument.
-
#initialize {|key| ... } ⇒ EMMap
constructor
initlialize with a block which returns comparing basis like Enumerable::sort_by, however using <, not <=>.
- #insert(*args) ⇒ Object
-
#lower_bound ⇒ EMMap::Iterator
Return iterator to lower bound.
-
#size ⇒ Integer
Return container size.
-
#upper_bound ⇒ EMMap::Iterator
Return iterator to upper bound.
Constructor Details
#initialize {|key| ... } ⇒ EMMap
initlialize with a block which returns comparing basis like Enumerable::sort_by, however using <, not <=>.
362 363 |
# File 'for_yard_product.rb', line 362 def initialize end |
Class Method Details
.find(first, last, obj = nil) {|obj| ... } ⇒ EMMap::Iterator
Searches the container for an element with an object equivalent to the third argument and/or validated with the provided block in a range of elements ([first,last)), 'obj' and returns an iterator to it if found, otherwise it returns an iterator to .
425 426 |
# File 'for_yard_product.rb', line 425 def EMMap.find first, last, obj = nil end |
.for_each(first, last) {|obj| ... } ⇒ Object
Applies given block to each of the elements in the range [first,last).
433 434 |
# File 'for_yard_product.rb', line 433 def EMMap.for_each first, last end |
Instance Method Details
#begin ⇒ EMMap::Iterator
Return iterator to beginning
365 366 |
# File 'for_yard_product.rb', line 365 def begin end |
#clear ⇒ Object
Clear content
374 375 |
# File 'for_yard_product.rb', line 374 def clear end |
#end ⇒ EMMap::Iterator
Return iterator to end
368 369 |
# File 'for_yard_product.rb', line 368 def end end |
#erase(position) ⇒ Object #erase(frist, last) ⇒ Object
407 408 |
# File 'for_yard_product.rb', line 407 def erase *args end |
#find(arg) ⇒ EMMap::Iterator
Searches the container for an element with an object equivalent to the argument.
412 413 |
# File 'for_yard_product.rb', line 412 def find arg end |
#insert(position, key, value) ⇒ EMMap::Iterator #insert(key, value) ⇒ EMMap::Iterator
393 394 |
# File 'for_yard_product.rb', line 393 def insert *args end |
#lower_bound ⇒ EMMap::Iterator
Return iterator to lower bound
380 381 |
# File 'for_yard_product.rb', line 380 def lower_bound end |
#size ⇒ Integer
Return container size
371 372 |
# File 'for_yard_product.rb', line 371 def size end |
#upper_bound ⇒ EMMap::Iterator
Return iterator to upper bound
377 378 |
# File 'for_yard_product.rb', line 377 def upper_bound end |