class
BoolChannel::StateChannel::EndlessQueue
- BoolChannel::StateChannel::EndlessQueue
- Deque(Nil)
- Reference
- Object
Defined in:
lavinmq/bool_channel.crInstance Method Summary
- #empty=(empty : Bool)
-
#empty? : Bool
Returns
trueifselfis empty,falseotherwise. -
#push(value : T)
Adds an item to the end of the deque.
-
#shift(&)
Removes and returns the first item, if not empty, otherwise executes the given block and returns its value.
Instance methods inherited from class Deque(Nil)
capacity
capacity
Instance Method Detail
def empty? : Bool
#
Description copied from module Indexable(Nil)
Returns true if self is empty, false otherwise.
([] of Int32).empty? # => true
([1]).empty? # => false
def push(value : T)
#
Description copied from class Deque(Nil)
Adds an item to the end of the deque.
a = Deque{1, 2}
a.push 3 # => Deque{1, 2, 3}
def shift(&)
#
Description copied from class Deque(Nil)
Removes and returns the first item, if not empty, otherwise executes the given block and returns its value.