ds/impl_ring_array.go

14 lines
250 B
Go
Raw Permalink Normal View History

2023-07-10 17:16:51 +02:00
package ds
type ArrayRing[T any] struct {
*ListRing[T, *ArrayList[*T]]
}
var _ Ring[int] = &ArrayRing[int]{}
func NewArrayRing[T any](size int) *ArrayRing[T] {
return &ArrayRing[T]{
ListRing: NewListRing[T](NewArrayList[*T](size), size),
}
}