R6
class for a queue of resolved task names.
Active bindings
names
Names of resolved tasks.
head
Non-negative integer pointing to the location of the
next name to pop.
Methods
Method validate()
Validate the queue.
Usage
crew_class_queue$validate()
Returns
NULL
(invisibly). Called for its side effects.
Method reset()
Reset the queue.
Returns
NULL
(invisibly). Called for its side effects.
Method set()
Set the names in the queue.
Arguments
names
Character vector of names to set.
Returns
NULL
(invisibly). Called for its side effects.
Method pop()
Pop a name off the queue.
Returns
Character string, a name popped off the queue.
NULL
if there are no more names available to pop.
Method collect()
Remove and return all available names off the queue.
Usage
crew_class_queue$collect()
Returns
Character vector, names collected from the queue.
NULL
if there are no more names available to collect.
Method empty()
Report if the queue is empty.
Returns
TRUE
if the queue is empty, FALSE
otherwise.
Method nonempty()
Report if the queue is nonempty.
Usage
crew_class_queue$nonempty()
Returns
TRUE
if the queue is nonempty, FALSE
otherwise.
Method popped()
List the names already popped.
Usage
crew_class_queue$popped()
Details
set()
, reset()
, and collect()
remove these names.
Returns
Character vector of names already popped.
Examples
crew_queue()
#> <crew_class_queue>
#> Public:
#> collect: function ()
#> empty: function ()
#> head: active binding
#> names: active binding
#> nonempty: function ()
#> pop: function ()
#> popped: function ()
#> reset: function ()
#> set: function (names = character(0L))
#> validate: function ()
#> Private:
#> .head: 1
#> .names: