diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/EmptyMutableIterator.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/EmptyMutableIterator.kt deleted file mode 100644 index b673ac9c3..000000000 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/EmptyMutableIterator.kt +++ /dev/null @@ -1,44 +0,0 @@ -package ru.dbotthepony.mc.otm.core - -object EmptyMutableIterator : MutableIterator<@UnsafeVariance Nothing>, MutableListIterator<@UnsafeVariance Nothing> { - override fun hasPrevious(): Boolean { - return false - } - - override fun nextIndex(): Int { - return 0 - } - - override fun previous(): Nothing { - throw NoSuchElementException() - } - - override fun previousIndex(): Int { - return -1 - } - - override fun add(element: Nothing) { - throw UnsupportedOperationException() - } - - override fun hasNext(): Boolean { - return false - } - - override fun next(): Nothing { - throw NoSuchElementException() - } - - override fun remove() { - throw NoSuchElementException() - } - - override fun set(element: Nothing) { - throw UnsupportedOperationException() - } - - @Suppress("unchecked_cast") - fun cast(): MutableListIterator { - return this as MutableListIterator - } -}