diff --git a/src/main/kotlin/SortedList.kt b/src/main/kotlin/SortedList.kt index a4c617a..9ff0439 100644 --- a/src/main/kotlin/SortedList.kt +++ b/src/main/kotlin/SortedList.kt @@ -46,6 +46,9 @@ open class SortedList constructor( open fun contains(element: E, searchForward: Boolean) = search(element, searchForward) >= 0 override fun contains(element: E) = contains(element, true) + override fun indexOf(element: E) = search(element, true) + override fun lastIndexOf(element: E) = search(element, false) + override fun containsAll(elements: Collection) = containsAll(elements, true) open fun containsAll(elements: Collection, searchForward: Boolean): Boolean { for (element in elements)