class Deque(T)
Overview
A Deque ("double-ended queue") is a collection of objects of type T that behaves much like an Array.
Deque has a subset of Array's API. It performs better than an Array
when there are frequent insertions or deletions
of items near the beginning or the end.
The most typical use case of a Deque is a queue: use push
to add items to the end of the queue and shift
to get
and remove the item at the beginning of the queue.
This Deque is implemented with a dynamic array used as a circular buffer.
Included Modules
- Indexable::Mutable(T)
Defined in:
nason/to_json.crConstructors
Class Method Summary
Instance Method Summary
Instance methods inherited from class Reference
==(other : NASON::Any)
==
Instance methods inherited from class Object
===(other : NASON::Any)
===,
nil_or_null?
nil_or_null?,
not_null!
not_null!,
null?
null?,
to_nason(io : IO) : Nilto_nason : String to_nason, to_pretty_json(indent : String = " ") : String
to_pretty_json(io : IO, indent : String = " ") : Nil to_pretty_json
Class methods inherited from class Object
from_nason(string_or_io, root : String)from_nason(string_or_io) from_nason