Documentation ¶
Index ¶
- type Array
- func (a *Array[T]) ClearAndIter() []T
- func (a *Array[T]) Contains(t T) bool
- func (a *Array[T]) Delete(i int)
- func (a *Array[T]) IsEmpty() bool
- func (a *Array[T]) Iter() []T
- func (a *Array[T]) MarshalJSON() ([]byte, error)
- func (a *Array[T]) Put(t ...T)
- func (a *Array[T]) PutAll(t []T)
- func (a *Array[T]) RandomTake() (t T)
- func (a *Array[T]) Remove(t T)
- func (a *Array[T]) Size() int
- func (a *Array[T]) String() string
- func (a *Array[T]) Take() (t T, result bool)
- func (a *Array[T]) UnmarshalJSON(b []byte) error
- type BlockQueue
- type Queue
- type Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
func (*Array[T]) ClearAndIter ¶
func (a *Array[T]) ClearAndIter() []T
func (*Array[T]) MarshalJSON ¶
func (*Array[T]) RandomTake ¶
func (a *Array[T]) RandomTake() (t T)
func (*Array[T]) UnmarshalJSON ¶
type BlockQueue ¶
type BlockQueue[T any] struct { // contains filtered or unexported fields }
func NewBlockQueue ¶
func NewBlockQueue[T any]() *BlockQueue[T]
func NewBlockQueueWithCap ¶
func NewBlockQueueWithCap[T any](capacity int) *BlockQueue[T]
func (*BlockQueue[T]) Pop ¶
func (bq *BlockQueue[T]) Pop() any
Pop This is only supported when methods use coroutines todo To be solved: cannot use item (variable of type any) as type T in return statement
func (*BlockQueue[T]) Push ¶
func (bq *BlockQueue[T]) Push(item T)
Click to show internal directories.
Click to hide internal directories.