Override indexOf implementation for sorted collections
This commit is contained in:
parent
299c6ea27f
commit
466716917d
@ -46,6 +46,9 @@ open class SortedList<E> 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<E>) = containsAll(elements, true)
|
||||
open fun containsAll(elements: Collection<E>, searchForward: Boolean): Boolean {
|
||||
for (element in elements)
|
||||
|
Loading…
x
Reference in New Issue
Block a user