No implementations exist for DoublyLinkedList and RingBuffer

There is no implementation for DoublyLinkedList and RingBuffer in Chapter 5.

Even though DoublyLinkedList can be implemented by the reader, RingBuffer class is not provided in the Kotlin language itself or in the book.

I think that putting a class that is not provided in the Kotlin language or the book into the example of the book is a factor that makes the reader very confused. And it is necessary to provide a github link where the entire project file including the code of each chapter is uploaded.

https://www.reddit.com/r/Kotlin/comments/npr4py/error_cannot_access_ringbuffer_it_is_private_in/?utm_source=share&utm_medium=web2x&context=3

Like Reddit’s article, I think there are many readers who are confused by these codes. I’m curious about the author’s intention to use classes that cannot be referenced as examples.

class LinkedListQueue<T : Any> : Queue<T> {
  private val list = DoublyLinkedList<T>()

  private var size = 0

  override val count: Int
    get() = size
}
class RingBufferQueue<T : Any>(size: Int) : Queue<T> {
  private val ringBuffer: RingBuffer<T> = RingBuffer(size)

  override val count: Int
    get() = ringBuffer.count

  override fun peek(): T? = ringBuffer.first
}