1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 08:32:40 +08:00

collection

This commit is contained in:
2022-11-18 16:56:56 +08:00
parent f3ca69f159
commit cf30b4eb4c
8 changed files with 159 additions and 0 deletions

View File

@ -0,0 +1,35 @@
package queue
import (
"github.com/charlienet/go-mixed/collections/list"
)
type Queue[T any] struct {
list list.LinkedList[T]
}
func NewQueue[T any]() *Queue[T] {
return &Queue[T]{}
}
func (q *Queue[T]) Synchronize() *Queue[T] {
q.list.Synchronize()
return q
}
func (q *Queue[T]) Push(v T) {
}
func (q *Queue[T]) Pop(v T) {
}
func (q *Queue[T]) Size() int {
return q.list.Size()
}
func (q *Queue[T]) IsEmpty() bool {
return false
}