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
- #add(*args) ⇒ Object
-
#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 <=>.
445 446 |
# File 'for_yard_product.rb', line 445 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 .
525 526 |
# File 'for_yard_product.rb', line 525 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).
534 535 |
# File 'for_yard_product.rb', line 534 def EMMap.for_each first, last end |
Instance Method Details
#add(position, key, value) ⇒ True #add(key, value) ⇒ True
489 490 |
# File 'for_yard_product.rb', line 489 def add *args end |
#begin ⇒ EMMap::Iterator
Return iterator to beginning
448 449 |
# File 'for_yard_product.rb', line 448 def begin end |
#clear ⇒ Object
Clear content
457 458 |
# File 'for_yard_product.rb', line 457 def clear end |
#end ⇒ EMMap::Iterator
Return iterator to end
451 452 |
# File 'for_yard_product.rb', line 451 def end end |
#erase(position) ⇒ Object #erase(frist, last) ⇒ Object
505 506 |
# File 'for_yard_product.rb', line 505 def erase *args end |
#find(arg) ⇒ EMMap::Iterator
Searches the container for an element with an object equivalent to the argument.
511 512 |
# File 'for_yard_product.rb', line 511 def find arg end |
#insert(position, key, value) ⇒ EMMap::Iterator #insert(key, value) ⇒ EMMap::Iterator
476 477 |
# File 'for_yard_product.rb', line 476 def insert *args end |
#lower_bound ⇒ EMMap::Iterator
Return iterator to lower bound
463 464 |
# File 'for_yard_product.rb', line 463 def lower_bound end |
#size ⇒ Integer
Return container size
454 455 |
# File 'for_yard_product.rb', line 454 def size end |
#upper_bound ⇒ EMMap::Iterator
Return iterator to upper bound
460 461 |
# File 'for_yard_product.rb', line 460 def upper_bound end |