kotlin.collections.subtract

subtract

infix fun <T> Iterable<T>.subtract(
    other: Iterable<T>
): Set<T>

Returns a set containing all elements that are contained by this collection and not contained by the specified collection.

The returned set preserves the element iteration order of the original collection.

infix fun <T> Array<out T>.subtract(
    other: Iterable<T>
): Set<T>
infix fun ByteArray.subtract(
    other: Iterable<Byte>
): Set<Byte>
infix fun ShortArray.subtract(
    other: Iterable<Short>
): Set<Short>
infix fun IntArray.subtract(other: Iterable<Int>): Set<Int>
infix fun LongArray.subtract(
    other: Iterable<Long>
): Set<Long>
infix fun FloatArray.subtract(
    other: Iterable<Float>
): Set<Float>
infix fun DoubleArray.subtract(
    other: Iterable<Double>
): Set<Double>
infix fun BooleanArray.subtract(
    other: Iterable<Boolean>
): Set<Boolean>
infix fun CharArray.subtract(
    other: Iterable<Char>
): Set<Char>

Returns a set containing all elements that are contained by this array and not contained by the specified collection.

The returned set preserves the element iteration order of the original array.

© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/subtract.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部