Documentation
¶
Index ¶
- type Queue
- type QueueLimited
- func (ql *QueueLimited[T]) Len() int
- func (ql *QueueLimited[T]) PopBack() *T
- func (ql *QueueLimited[T]) PopBackAll() []T
- func (ql *QueueLimited[T]) PopBackN(n int) []T
- func (ql *QueueLimited[T]) PushFront(v T) bool
- func (ql *QueueLimited[T]) PushFrontN(vs []T) bool
- func (ql *QueueLimited[T]) RemoveAll()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
Queue is a thread-safe linkedlist
func (*Queue[T]) PopBackAll ¶
func (q *Queue[T]) PopBackAll() []T
func (*Queue[T]) PushFrontN ¶
func (q *Queue[T]) PushFrontN(vs []T)
type QueueLimited ¶
type QueueLimited[T any] struct { // contains filtered or unexported fields }
QueueLimited is Queue with Limited Size
func NewQueueLimited ¶
func NewQueueLimited[T any](maxSize int) *QueueLimited[T]
func (*QueueLimited[T]) Len ¶
func (ql *QueueLimited[T]) Len() int
func (*QueueLimited[T]) PopBack ¶
func (ql *QueueLimited[T]) PopBack() *T
func (*QueueLimited[T]) PopBackAll ¶
func (ql *QueueLimited[T]) PopBackAll() []T
func (*QueueLimited[T]) PopBackN ¶
func (ql *QueueLimited[T]) PopBackN(n int) []T
func (*QueueLimited[T]) PushFront ¶
func (ql *QueueLimited[T]) PushFront(v T) bool
func (*QueueLimited[T]) PushFrontN ¶
func (ql *QueueLimited[T]) PushFrontN(vs []T) bool
func (*QueueLimited[T]) RemoveAll ¶
func (ql *QueueLimited[T]) RemoveAll()
Click to show internal directories.
Click to hide internal directories.