14 lines
250 B
Go
14 lines
250 B
Go
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),
|
|
}
|
|
}
|