Documentation ¶
Index ¶
- Constants
- Variables
- type ErrEmptyQueue
- type ErrFullQueue
- type Queue
- func (queue *Queue[T]) Clear()
- func (queue *Queue[T]) Dequeue() T
- func (queue *Queue[T]) Enqueue(value T)
- func (queue Queue[T]) IsEmpty() bool
- func (queue Queue[T]) IsFull() bool
- func (queue Queue[T]) Peek() T
- func (queue Queue[T]) Size() int
- func (queue *Queue[T]) String() string
- func (queue *Queue[T]) ToSlice() []T
Constants ¶
View Source
const ( // linked_queue with no maximum size Implementation LINKED int = iota // ArrayQueue with no maximum size Implementation ARRAY )
Variables ¶
View Source
var ( QueueHead string = "← | " QueueSep string = " | " )
Functions ¶
This section is empty.
Types ¶
type ErrEmptyQueue ¶
type ErrEmptyQueue struct{}
func (ErrEmptyQueue) Error ¶
func (e ErrEmptyQueue) Error() string
type ErrFullQueue ¶
type ErrFullQueue struct{}
func (ErrFullQueue) Error ¶
func (e ErrFullQueue) Error() string
type Queue ¶
type Queue[T any] struct { // contains filtered or unexported fields }
func NewLimitedQueue ¶
Click to show internal directories.
Click to hide internal directories.