From fd7619b1440d3b6ab96a88d0f88472b8d300bdb9 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sat, 14 Jan 2023 10:14:51 +0700 Subject: [PATCH] Remove EmptyMutableIterator --- .../mc/otm/core/EmptyMutableIterator.kt | 44 ------------------- 1 file changed, 44 deletions(-) delete mode 100644 src/main/kotlin/ru/dbotthepony/mc/otm/core/EmptyMutableIterator.kt 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 - } -}