Provide no-op members in JS ArrayList to work with capacity.

#KT-14637
This commit is contained in:
Ilya Gorbunov
2016-11-03 23:47:47 +03:00
parent fbcf7c146b
commit a067888fed
2 changed files with 11 additions and 0 deletions
@@ -21,6 +21,10 @@ public open class ArrayList<E> internal constructor(private var array: Array<Any
public constructor(capacity: Int = 0) : this(emptyArray()) {}
public constructor(elements: Collection<E>) : this(elements.toTypedArray<Any?>()) {}
/** Does nothing in this ArrayList implementation. */
public fun trimToSize() {}
/** Does nothing in this ArrayList implementation. */
public fun ensureCapacity(minCapacity: Int) {}
override val size: Int get() = array.size
override fun get(index: Int): E = array[rangeCheck(index)] as E