Class: Contender::Queue Abstract
- Inherits:
-
Object
- Object
- Contender::Queue
- Includes:
- Enumerable
- Defined in:
- lib/contender/queue.rb
Overview
This class is abstract.
Direct Known Subclasses
Instance Method Summary collapse
- #capacity_remaining ⇒ Integer abstract
- #clear ⇒ undefined abstract
- #delete(element) ⇒ Boolean abstract
- #drain_to(target, max_elements = FIXNUM_MAX) ⇒ Integer abstract
- #each {|Object| ... } ⇒ undefined abstract
- #empty? ⇒ Boolean
- #offer(element, timeout = nil) ⇒ Boolean abstract
- #peek ⇒ Object abstract
- #poll(timeout = nil) ⇒ Object abstract
- #put(element) ⇒ undefined abstract
- #size ⇒ Integer (also: #length) abstract
- #take ⇒ Object abstract
Instance Method Details
#capacity_remaining ⇒ Integer
This method is abstract.
70 71 72 |
# File 'lib/contender/queue.rb', line 70 def capacity_remaining raise NotImplementedError end |
#clear ⇒ undefined
This method is abstract.
42 43 44 |
# File 'lib/contender/queue.rb', line 42 def clear raise NotImplementedError end |
#delete(element) ⇒ Boolean
This method is abstract.
56 57 58 |
# File 'lib/contender/queue.rb', line 56 def delete(element) raise NotImplementedError end |
#drain_to(target, max_elements = FIXNUM_MAX) ⇒ Integer
This method is abstract.
64 65 66 |
# File 'lib/contender/queue.rb', line 64 def drain_to(target, max_elements = FIXNUM_MAX) raise NotImplementedError end |
#each {|Object| ... } ⇒ undefined
This method is abstract.
49 50 51 |
# File 'lib/contender/queue.rb', line 49 def each raise NotImplementedError end |
#empty? ⇒ Boolean
83 84 85 |
# File 'lib/contender/queue.rb', line 83 def empty? size == 0 end |
#offer(element, timeout = nil) ⇒ Boolean
This method is abstract.
10 11 12 |
# File 'lib/contender/queue.rb', line 10 def offer(element, timeout = nil) raise NotImplementedError end |
#peek ⇒ Object
This method is abstract.
36 37 38 |
# File 'lib/contender/queue.rb', line 36 def peek raise NotImplementedError end |
#poll(timeout = nil) ⇒ Object
This method is abstract.
24 25 26 |
# File 'lib/contender/queue.rb', line 24 def poll(timeout = nil) raise NotImplementedError end |
#put(element) ⇒ undefined
This method is abstract.
17 18 19 |
# File 'lib/contender/queue.rb', line 17 def put(element) raise NotImplementedError end |
#size ⇒ Integer Also known as: length
This method is abstract.
76 77 78 |
# File 'lib/contender/queue.rb', line 76 def size raise NotImplementedError end |
#take ⇒ Object
This method is abstract.
30 31 32 |
# File 'lib/contender/queue.rb', line 30 def take raise NotImplementedError end |