package com.smallhacker.disbrowser.util // The Kotlin standard library does not contain a counterpart to Java's ArrayDeque, so let's implement a simplistic // one ourselves for portability. interface ItemQueue : MutableCollection { fun removeNext(): E } class LifoQueue private constructor(private val list: MutableList) : ItemQueue, MutableCollection by list { constructor() : this(ArrayList()) override fun removeNext(): E = list.removeAt(0) }