Documentation ¶
Overview ¶
Package deque implements a deque using a circular array.
Index ¶
- type T
- func (q *T) Back() interface{}
- func (q *T) Clear()
- func (q *T) Front() interface{}
- func (q *T) Iter(f func(item interface{}) bool)
- func (q *T) PopBack() interface{}
- func (q *T) PopFront() interface{}
- func (q *T) PushBack(item interface{})
- func (q *T) PushFront(item interface{})
- func (q *T) Size() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type T ¶
type T struct {
// contains filtered or unexported fields
}
T is the type of queues.
func (*T) Back ¶
func (q *T) Back() interface{}
Back returns the last element of the deque, or nil if there is none.
func (*T) Front ¶
func (q *T) Front() interface{}
Front returns the first element of the deque, or nil if there is none.
func (*T) Iter ¶
Iter iterates over the elements of the deque. f should return false to terminate the iteration early.
func (*T) PopBack ¶
func (q *T) PopBack() interface{}
PopBack removes an element from the front of the queue and returns it.
func (*T) PopFront ¶
func (q *T) PopFront() interface{}
PopFront removes an element from the front of the queue and returns it.
func (*T) PushBack ¶
func (q *T) PushBack(item interface{})
PushBack adds an element to the back of the queue.
Click to show internal directories.
Click to hide internal directories.