ArrayWrapper

Array 包装接口, 用于增强 Array 功能.

Author

M8Test, [email protected], https://m8test.com

Functions

Link copied to clipboard
abstract fun all(predicate: (T) -> Boolean): Boolean

如果所有元素都满足给定谓词,则返回 true

Link copied to clipboard
abstract fun also(block: (Array<T>) -> Unit): ObjectWrapper<Array<T>>

对 ObjectWrapper 调用给定的 block 函数,并返回 ObjectWrapper 本身。

Link copied to clipboard
abstract fun any(predicate: (T) -> Boolean): Boolean

如果至少有一个元素满足给定谓词,则返回 true

Link copied to clipboard
abstract fun apply(block: Array<T>.() -> Unit): ObjectWrapper<Array<T>>

对 ObjectWrapper 调用给定的 block 函数,并返回 ObjectWrapper 本身。

Link copied to clipboard
abstract fun <K, V> associate(transform: (T) -> Pair<K, V>): MapWrapper<K, V>

返回一个包含由应用于给定数组元素的转换函数提供的键值对的映射。

Link copied to clipboard
abstract fun <K, V> associateBy(keySelector: (T) -> K, valueTransform: (T) -> V): MapWrapper<K, V>

返回一个 Map(映射),其中包含由 valueTransform 函数提供的值,并由应用于给定数组元素的 keySelector 函数进行索引。

Link copied to clipboard
abstract fun <K, V, M : MutableMapWrapper<in K, in V>> associateByTo(destination: M, keySelector: (T) -> K, valueTransform: (T) -> V): M

将键值对填充并返回目标可变映射,其中键由 keySelector 函数提供,值由应用于给定数组元素的 valueTransform 函数提供。

Link copied to clipboard
abstract fun <K, V, M : MutableMapWrapper<in K, in V>> associateTo(destination: M, transform: (T) -> Pair<K, V>): M

将键值对填充并返回目标可变映射,其中键值对由应用于给定数组元素的 transform 函数提供。

Link copied to clipboard
abstract fun <V> associateWith(valueSelector: (T) -> V): MapWrapper<T, V>

将每个元素与其对应的值关联起来,生成一个映射。

Link copied to clipboard
abstract fun <V, M : MutableMapWrapper<in T, in V>> associateWithTo(destination: M, valueSelector: (T) -> V): M

将每个元素与其对应的值关联起来,并将结果添加到目标可变映射中。

Link copied to clipboard
abstract fun contains(element: T): Boolean

检查数组是否包含指定元素。

Link copied to clipboard
abstract fun contentDeepEquals(other: Array<out T>): Boolean

检查此数组是否与另一个数组在内容上深度相等。

Link copied to clipboard
abstract fun contentDeepHashCode(): Int

返回此数组内容的深度哈希码。

Link copied to clipboard
abstract fun contentDeepToString(): String

返回此数组内容的字符串表示形式,其中包含数组的所有元素。

Link copied to clipboard
abstract fun contentToString(): String

返回此数组内容的字符串表示形式。

Link copied to clipboard
abstract fun copyInto(destination: ArrayWrapper<T>, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int): ArrayWrapper<T>

将此数组的元素复制到目标数组中。

Link copied to clipboard
abstract fun copyOf(newSize: Int): ArrayWrapper<T?>

创建一个具有指定 newSize 的新数组,并将此数组的元素复制到其中。 如果 newSize 大于此数组的大小,则新数组中超出此数组大小的元素将填充为 null。

Link copied to clipboard
abstract fun copyOfRange(fromIndex: Int, toIndex: Int): ArrayWrapper<T>

创建一个新数组,并将此数组中指定范围内的元素复制到其中。 范围由 fromIndex(包括)和 toIndex(不包括)定义。

Link copied to clipboard
abstract fun count(): Int

返回数组中元素的总数。

abstract fun count(predicate: (T) -> Boolean): Int

返回满足给定谓词的元素数量。

Link copied to clipboard
abstract fun distinct(): ListWrapper<T>

返回一个列表,其中包含此数组中不同的元素。

Link copied to clipboard
abstract fun <K> distinctBy(selector: (T) -> K): ListWrapper<T>

返回一个列表,其中包含此数组中由给定键选择器函数选择的不同元素。

Link copied to clipboard
abstract fun drop(n: Int): ListWrapper<T>

返回一个列表,其中包含此数组中除前 n 个元素之外的所有元素。

Link copied to clipboard
abstract fun dropLast(n: Int): ListWrapper<T>

返回一个列表,其中包含此数组中除最后 n 个元素之外的所有元素。

Link copied to clipboard
abstract fun dropLastWhile(predicate: (T) -> Boolean): ListWrapper<T>

返回一个列表,其中包含此数组中除满足给定谓词的最后一个元素之外的所有元素。

Link copied to clipboard
abstract fun dropWhile(predicate: (T) -> Boolean): ListWrapper<T>

返回一个列表,其中包含此数组中除满足给定谓词的第一个元素之外的所有元素。

Link copied to clipboard
abstract fun elementAt(index: Int): T

返回此数组中指定索引处的元素。

Link copied to clipboard
abstract fun elementAtOrElse(index: Int, defaultValue: (Int) -> T): T

返回此数组中指定索引处的元素,如果索引超出范围,则返回 defaultValue 函数的结果。

Link copied to clipboard
abstract fun elementAtOrNull(index: Int): T?

返回此数组中指定索引处的元素,如果索引超出范围,则返回 null。

Link copied to clipboard
abstract fun fill(element: T, fromIndex: Int = 0, toIndex: Int)

使用指定的 element 填充此数组的指定范围。 范围由 fromIndex(包括)和 toIndex(不包括)定义。

Link copied to clipboard
abstract fun filter(predicate: (T) -> Boolean): ListWrapper<T>

返回一个列表,其中包含此数组中满足给定谓词的所有元素。

Link copied to clipboard
abstract fun filterIndexed(predicate: (index: Int, T) -> Boolean): ListWrapper<T>

返回一个列表,其中包含此数组中满足给定谓词的所有元素,以及它们的索引。

Link copied to clipboard
abstract fun <C : MutableCollectionWrapper<in T>> filterIndexedTo(destination: C, predicate: (index: Int, T) -> Boolean): C

将此数组中满足给定谓词的所有元素添加到目标集合中,以及它们的索引。

Link copied to clipboard
abstract fun filterNot(predicate: (T) -> Boolean): ListWrapper<T>

返回一个列表,其中包含此数组中不满足给定谓词的所有元素。

Link copied to clipboard
abstract fun <C : MutableCollectionWrapper<in T>> filterNotTo(destination: C, predicate: (T) -> Boolean): C

将此数组中不满足给定谓词的所有元素添加到目标集合中。

Link copied to clipboard
abstract fun <C : MutableCollectionWrapper<in T>> filterTo(destination: C, predicate: (T) -> Boolean): C

将此数组中满足给定谓词的所有元素添加到目标集合中。

Link copied to clipboard
abstract fun find(predicate: (T) -> Boolean): T?

返回此数组中满足给定谓词的第一个元素。

Link copied to clipboard
abstract fun findLast(predicate: (T) -> Boolean): T?

返回此数组中满足给定谓词的最后一个元素。

Link copied to clipboard
abstract fun first(predicate: (T) -> Boolean): T

返回此数组中满足给定谓词的第一个元素。

Link copied to clipboard
abstract fun <R : Any> firstNotNullOf(transform: (T) -> R?): R

返回此数组中应用 transform 函数后第一个不为 null 的结果。

Link copied to clipboard
abstract fun <R : Any> firstNotNullOfOrNull(transform: (T) -> R?): R?

返回此数组中应用 transform 函数后第一个不为 null 的结果。

Link copied to clipboard
abstract fun firstOrNull(predicate: (T) -> Boolean): T?

返回此数组中满足给定谓词的第一个元素。

Link copied to clipboard
abstract fun <R> flatMap(transform: (T) -> Iterable<R>): ListWrapper<R>

返回一个列表,其中包含将 transform 函数应用于此数组的每个元素的结果,并将结果连接成一个列表。

Link copied to clipboard
abstract fun <R> flatMapIndexed(transform: (index: Int, T) -> Iterable<R>): ListWrapper<R>

返回一个列表,其中包含将 transform 函数应用于此数组的每个元素及其索引的结果,并将结果连接成一个列表。

Link copied to clipboard
abstract fun <R, C : MutableCollectionWrapper<in R>> flatMapIndexedTo(destination: C, transform: (index: Int, T) -> Iterable<R>): C

将 transform 函数应用于此数组的每个元素及其索引的结果,并将结果连接到目标集合中。

Link copied to clipboard
abstract fun <R, C : MutableCollectionWrapper<in R>> flatMapTo(destination: C, transform: (T) -> Iterable<R>): C

将 transform 函数应用于此数组的每个元素的结果,并将结果连接到目标集合中。

Link copied to clipboard
abstract fun <R> fold(initial: R, operation: (acc: R, T) -> R): R

使用 operation 函数累积此数组的元素到一个单一值。

Link copied to clipboard
abstract fun <R> foldIndexed(initial: R, operation: (index: Int, acc: R, T) -> R): R

使用 operation 函数累积此数组的元素及其索引到一个单一值。

Link copied to clipboard
abstract fun <R> foldRight(initial: R, operation: (T, acc: R) -> R): R

使用 operation 函数从右到左累积此数组的元素到一个单一值。

Link copied to clipboard
abstract fun <R> foldRightIndexed(initial: R, operation: (index: Int, T, acc: R) -> R): R

使用 operation 函数从右到左累积此数组的元素及其索引到一个单一值。

Link copied to clipboard
abstract fun forEach(action: (T) -> Unit)

对此数组的每个元素执行给定的 action。

Link copied to clipboard
abstract fun forEachIndexed(action: (index: Int, T) -> Unit)

对此数组的每个元素及其索引执行给定的 action。

Link copied to clipboard
abstract fun getOrElse(index: Int, defaultValue: (Int) -> T): T

返回此数组中指定索引处的元素,如果索引超出范围,则返回 defaultValue 函数的结果。

Link copied to clipboard
abstract override fun getOrigin(): Array<T>

获取被包装的对象.

Link copied to clipboard
abstract fun getOrNull(index: Int): T?

返回此数组中指定索引处的元素,如果索引超出范围,则返回 null。

Link copied to clipboard
abstract fun <K, V> groupBy(keySelector: (T) -> K, valueTransform: (T) -> V): MapWrapper<K, List<V>>

返回一个映射,其中键由 keySelector 函数生成,值是具有相同键的元素列表,由 valueTransform 函数转换。

Link copied to clipboard
abstract fun <K, V, M : MutableMapWrapper<in K, MutableList<V>>> groupByTo(destination: M, keySelector: (T) -> K, valueTransform: (T) -> V): M

返回一个映射,其中键由 keySelector 函数生成,值是具有相同键的元素列表,由 valueTransform 函数转换,并将结果存储在 destination 映射中。

Link copied to clipboard
abstract fun <K> groupingBy(keySelector: (T) -> K): GroupingWrapper<T, K>

返回一个 Grouping 对象,该对象可用于对此数组的元素进行分组。

Link copied to clipboard
abstract fun indexOf(element: T): Int

返回此数组中指定元素的第一个索引。

Link copied to clipboard
abstract fun indexOfFirst(predicate: (T) -> Boolean): Int

返回此数组中满足给定谓词的第一个元素的索引。

Link copied to clipboard
abstract fun indexOfLast(predicate: (T) -> Boolean): Int

返回此数组中满足给定谓词的最后一个元素的索引。

Link copied to clipboard
abstract fun intersect(other: Iterable<T>): SetWrapper<T>

返回此数组和给定集合的交集。

Link copied to clipboard
abstract fun isEmpty(): Boolean

如果此数组为空,则返回 true。

Link copied to clipboard
abstract fun isNotEmpty(): Boolean

如果此数组不为空,则返回 true。

Link copied to clipboard
abstract fun <A : Appendable> joinTo(buffer: A, separator: CharSequence = ", ", prefix: CharSequence = "", postfix: CharSequence = "", limit: Int = -1, truncated: CharSequence = "...", transform: (T) -> CharSequence? = null): A

将此数组的所有元素追加到给定的 Appendable 对象中,并使用给定的分隔符、前缀和后缀分隔它们。

Link copied to clipboard
abstract fun joinToString(separator: CharSequence = ", ", prefix: CharSequence = "", postfix: CharSequence = "", limit: Int = -1, truncated: CharSequence = "...", transform: (T) -> CharSequence? = null): String

创建一个字符串,其中包含此数组的所有元素,并使用给定的分隔符、前缀和后缀分隔它们。

Link copied to clipboard
abstract fun last(predicate: (T) -> Boolean): T

返回此数组中满足给定谓词的最后一个元素。

Link copied to clipboard
abstract fun lastIndexOf(element: T): Int

返回此数组中指定元素的最后一个索引。

Link copied to clipboard
abstract fun lastOrNull(predicate: (T) -> Boolean): T?

返回此数组中满足给定谓词的最后一个元素。

Link copied to clipboard
abstract fun <R> let(block: (Array<T>) -> R): ObjectWrapper<R>?

对 ObjectWrapper 调用给定的 block 函数,并返回 block 函数的结果包装在 ObjectWrapper 中。

Link copied to clipboard
abstract fun <R> map(transform: (T) -> R): ListWrapper<R>

返回一个列表,其中包含将给定 transform 函数应用于此数组的每个元素的结果。

Link copied to clipboard
abstract fun <R> mapIndexed(transform: (index: Int, T) -> R): ListWrapper<R>

返回一个列表,其中包含将给定 transform 函数应用于此数组的每个元素及其索引的结果。

Link copied to clipboard
abstract fun <R : Any> mapIndexedNotNull(transform: (index: Int, T) -> R?): ListWrapper<R>

返回一个列表,其中包含将给定 transform 函数应用于此数组的每个元素及其索引的结果,并过滤掉 null 结果。

Link copied to clipboard
abstract fun <R : Any, C : MutableCollectionWrapper<in R>> mapIndexedNotNullTo(destination: C, transform: (index: Int, T) -> R?): C

将给定 transform 函数应用于此数组的每个元素及其索引的结果,并将非 null 结果添加到目标集合中。

Link copied to clipboard
abstract fun <R, C : MutableCollectionWrapper<in R>> mapIndexedTo(destination: C, transform: (index: Int, T) -> R): C

将给定 transform 函数应用于此数组的每个元素及其索引的结果,并将结果添加到目标集合中。

Link copied to clipboard
abstract fun <R : Any> mapNotNull(transform: (T) -> R?): ListWrapper<R>

返回一个列表,其中包含将给定 transform 函数应用于此数组的每个元素的结果,并过滤掉 null 结果。

Link copied to clipboard
abstract fun <R : Any, C : MutableCollectionWrapper<in R>> mapNotNullTo(destination: C, transform: (T) -> R?): C

将给定 transform 函数应用于此数组的每个元素的结果,并将非 null 结果添加到目标集合中。

Link copied to clipboard
abstract fun <R, C : MutableCollectionWrapper<in R>> mapTo(destination: C, transform: (T) -> R): C

将给定 transform 函数应用于此数组的每个元素的结果,并将结果添加到目标集合中。

Link copied to clipboard
abstract fun <R : Comparable<R>> maxByOrNull(selector: (T) -> R): T?

返回此数组中根据给定 selector 函数选择的最大元素。

Link copied to clipboard
abstract fun <R : Comparable<R>> maxOf(selector: (T) -> R): R

返回此数组中根据给定 selector 函数选择的最大元素值。

Link copied to clipboard
abstract fun <R : Comparable<R>> maxOfOrNull(selector: (T) -> R): R?

返回此数组中根据给定 selector 函数选择的最大元素值,如果数组为空则返回 null。

Link copied to clipboard
abstract fun <R : Comparable<R>> minByOrNull(selector: (T) -> R): T?

返回此数组中根据给定 selector 函数选择的最小元素。

Link copied to clipboard
abstract fun <R : Comparable<R>> minOf(selector: (T) -> R): R

返回此数组中根据给定 selector 函数选择的最小元素值。

Link copied to clipboard
abstract fun <R : Comparable<R>> minOfOrNull(selector: (T) -> R): R?

返回此数组中根据给定 selector 函数选择的最小元素值,如果数组为空则返回 null。

Link copied to clipboard
abstract fun none(predicate: (T) -> Boolean): Boolean

如果此数组中没有元素满足给定谓词,则返回 true。

Link copied to clipboard
abstract fun onEach(action: (T) -> Unit): ArrayWrapper<out T>

对此数组的每个元素执行给定的 action

Link copied to clipboard
abstract fun onEachIndexed(action: (index: Int, T) -> Unit): ArrayWrapper<out T>

对此数组的每个元素及其索引执行给定的 action

Link copied to clipboard
abstract fun partition(predicate: (T) -> Boolean): Pair<List<T>, List<T>>

将此数组的元素分成两个列表,其中一个列表包含满足给定 predicate 的元素,另一个列表包含不满足给定 predicate 的元素。

Link copied to clipboard
abstract fun plus(elements: Collection<T>): ArrayWrapper<T>

创建一个包含此数组所有元素和给定 elements 集合中所有元素的新数组。

Link copied to clipboard
abstract fun random(random: Random): T

使用指定的 random 实例从此数组中返回一个随机元素。

Link copied to clipboard
abstract fun randomOrNull(random: Random): T?

使用指定的 random 实例从此数组中返回一个随机元素。

Link copied to clipboard
abstract fun reduce(operation: (T, T) -> T): T

使用指定的 operation 对数组的元素进行累积操作。

Link copied to clipboard
abstract fun reduceIndexed(operation: (index: Int, acc: T, T) -> T): T

使用指定的 operation 对数组的元素及其索引进行累积操作。

Link copied to clipboard
abstract fun reduceIndexedOrNull(operation: (index: Int, acc: T, T) -> T): T?

使用指定的 operation 对数组的元素及其索引进行累积操作。 如果数组为空,则返回 null。

Link copied to clipboard
abstract fun reduceOrNull(operation: (acc: T, T) -> T): T?

使用指定的 operation 对数组的元素进行累积操作。 如果数组为空,则返回 null。

Link copied to clipboard
abstract fun reduceRight(operation: (T, acc: T) -> T): T

使用指定的 operation 从右到左对数组的元素进行累积操作。

Link copied to clipboard
abstract fun reduceRightIndexed(operation: (index: Int, T, acc: T) -> T): T

使用指定的 operation 从右到左对数组的元素及其索引进行累积操作。

Link copied to clipboard
abstract fun reduceRightIndexedOrNull(operation: (index: Int, T, acc: T) -> T): T?

使用指定的 operation 从右到左对数组的元素及其索引进行累积操作。 如果数组为空,则返回 null。

Link copied to clipboard
abstract fun reduceRightOrNull(operation: (T, acc: T) -> T): T?

使用指定的 operation 从右到左对数组的元素进行累积操作。 如果数组为空,则返回 null。

Link copied to clipboard
abstract fun reverse(fromIndex: Int, toIndex: Int)

反转此数组中指定范围内的元素。 范围由 fromIndex(包括)和 toIndex(不包括)定义。

Link copied to clipboard
abstract fun reversed(): ListWrapper<T>

返回一个包含此数组元素的反向顺序的新列表。

Link copied to clipboard
abstract fun reversedArray(): ArrayWrapper<T>

创建一个包含此数组所有元素的新数组,但顺序相反。

Link copied to clipboard
abstract fun <R> run(block: Array<T>.() -> R): ObjectWrapper<R>?

对 ObjectWrapper 调用给定的 block 函数,并返回 block 函数的结果包装在 ObjectWrapper 中。

Link copied to clipboard
abstract fun <R> runningFold(initial: R, operation: (acc: R, T) -> R): ListWrapper<R>

对此数组的每个元素依次应用给定的 operation 函数,并返回一个包含所有中间结果的新列表。

Link copied to clipboard
abstract fun <R> runningFoldIndexed(initial: R, operation: (index: Int, acc: R, T) -> R): ListWrapper<R>

对此数组的每个元素及其索引依次应用给定的 operation 函数,并返回一个包含所有中间结果的新列表。

Link copied to clipboard
abstract fun runningReduce(operation: (acc: T, T) -> T): ListWrapper<T>

对此数组的每个元素依次应用给定的 operation 函数,并返回一个包含所有中间结果的新列表。

Link copied to clipboard
abstract fun runningReduceIndexed(operation: (index: Int, acc: T, T) -> T): ListWrapper<T>

对此数组的每个元素及其索引依次应用给定的 operation 函数,并返回一个包含所有中间结果的新列表。

Link copied to clipboard
abstract fun <R> scan(initial: R, operation: (acc: R, T) -> R): ListWrapper<R>

对此数组的每个元素依次应用给定的 operation 函数,并返回一个包含所有中间结果的新列表。

Link copied to clipboard
abstract fun <R> scanIndexed(initial: R, operation: (index: Int, acc: R, T) -> R): ListWrapper<R>

对此数组的每个元素及其索引依次应用给定的 operation 函数,并返回一个包含所有中间结果的新列表。

Link copied to clipboard
abstract fun set(index: Int, value: T)

设置指定索引处的值。

Link copied to clipboard
abstract fun shuffle(random: Random)

使用指定的 random 实例随机排列此数组中的元素。

Link copied to clipboard
abstract fun single(predicate: (T) -> Boolean): T

返回此数组中满足给定 predicate 的唯一元素。

Link copied to clipboard
abstract fun singleOrNull(predicate: (T) -> Boolean): T?

返回此数组中满足给定 predicate 的唯一元素。

Link copied to clipboard
abstract fun slice(indices: Iterable<Int>): ListWrapper<T>

返回一个包含此数组中指定 indices 处元素的新列表。

Link copied to clipboard
abstract fun sliceArray(indices: Collection<Int>): ArrayWrapper<T>

创建一个新数组,并将此数组中指定 indices 集合中索引处的元素复制到其中。

Link copied to clipboard
abstract fun <T : Comparable<T>> sort(fromIndex: Int = 0, toIndex: Int)

使用快速排序算法对此数组的指定范围内的元素进行排序。

Link copied to clipboard
abstract fun <R : Comparable<R>> sortBy(selector: (T) -> R?)

根据给定 selector 函数选择的值对此数组的元素进行排序。

Link copied to clipboard
abstract fun <R : Comparable<R>> sortByDescending(selector: (T) -> R?)

根据给定 selector 函数选择的值对此数组的元素进行降序排序。

Link copied to clipboard
abstract fun sortedArrayWith(comparator: Comparator<in T>): ArrayWrapper<out T>

使用指定的 comparator 对此数组的元素进行排序。

Link copied to clipboard
abstract fun <R : Comparable<R>> sortedBy(selector: (T) -> R?): ListWrapper<T>

根据给定 selector 函数选择的值对此数组的元素进行排序,并返回一个包含排序元素的新列表。

Link copied to clipboard
abstract fun <R : Comparable<R>> sortedByDescending(selector: (T) -> R?): ListWrapper<T>

根据给定 selector 函数选择的值对此数组的元素进行降序排序,并返回一个包含排序元素的新列表。

Link copied to clipboard
abstract fun sortWith(comparator: Comparator<in T>)

使用指定的 comparator 对此数组的元素进行排序。

Link copied to clipboard
abstract fun subtract(other: Iterable<T>): SetWrapper<T>

返回一个包含此数组中所有元素的新集合,减去给定 other 集合中的元素。

Link copied to clipboard
abstract fun take(n: Int): ListWrapper<T>

返回一个包含此数组中前 n 个元素的新列表。

Link copied to clipboard
abstract fun takeIf(predicate: (Array<T>) -> Boolean): ObjectWrapper<Array<T>>?

如果 ObjectWrapper 满足给定的 predicate,则返回 ObjectWrapper 本身,否则返回 null 包装在 ObjectWrapper? 中。

Link copied to clipboard
abstract fun takeLast(n: Int): ListWrapper<T>

返回一个包含此数组中最后 n 个元素的新列表。

Link copied to clipboard
abstract fun takeLastWhile(predicate: (T) -> Boolean): ListWrapper<T>

返回一个包含此数组中满足给定 predicate 的最后一个元素的新列表。

Link copied to clipboard
abstract fun takeUnless(predicate: (Array<T>) -> Boolean): ObjectWrapper<Array<T>>?

如果 ObjectWrapper 不满足给定的 predicate,则返回 ObjectWrapper 本身,否则返回 null 包装在 ObjectWrapper? 中。

Link copied to clipboard
abstract fun takeWhile(predicate: (T) -> Boolean): ListWrapper<T>

返回一个包含此数组中满足给定 predicate 的第一个元素的新列表。

Link copied to clipboard
abstract fun <C : MutableCollectionWrapper<in T>> toCollection(destination: C): C

将此数组的所有元素添加到给定的 destination 集合中。

Link copied to clipboard
abstract fun union(other: Iterable<T>): SetWrapper<T>

返回一个包含此数组和给定 other 集合中所有元素的新集合。

Link copied to clipboard

返回一个包含此数组中所有元素及其索引的新可迭代对象。

Link copied to clipboard
abstract fun <R, V> zip(other: Iterable<R>, transform: (a: T, b: R) -> V): ListWrapper<V>

返回一个包含此数组和给定 other 可迭代对象中元素对的新列表,这些元素对由给定 transform 函数转换。