Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SliceQueue ¶
type SliceQueue struct {
// contains filtered or unexported fields
}
SliceQueue is an unbounded queue which uses a slice as underlying.
func NewSliceQueue ¶
func NewSliceQueue(n int) (q *SliceQueue)
NewSliceQueue returns an empty queue. You can give a initial capacity.
func (*SliceQueue) Dequeue ¶
func (q *SliceQueue) Dequeue() interface{}
Dequeue removes and returns the value at the head of the queue. It returns nil if the queue is empty.
func (*SliceQueue) Enqueue ¶
func (q *SliceQueue) Enqueue(v interface{})
Enqueue puts the given value v at the tail of the queue.
Click to show internal directories.
Click to hide internal directories.