Mention union in intersect documentation and vice versa (KT-26212)
This commit is contained in:
@@ -9610,9 +9610,11 @@ public inline fun <K> CharArray.distinctBy(selector: (Char) -> K): List<Char> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a set containing all elements that are contained by both this set and the specified collection.
|
||||
* Returns a set containing all elements that are contained by both this array and the specified collection.
|
||||
*
|
||||
* The returned set preserves the element iteration order of the original array.
|
||||
*
|
||||
* To get a set containing all elements that are contained at least in one of these collections use [union].
|
||||
*/
|
||||
public infix fun <T> Array<out T>.intersect(other: Iterable<T>): Set<T> {
|
||||
val set = this.toMutableSet()
|
||||
@@ -9621,9 +9623,11 @@ public infix fun <T> Array<out T>.intersect(other: Iterable<T>): Set<T> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a set containing all elements that are contained by both this set and the specified collection.
|
||||
* Returns a set containing all elements that are contained by both this array and the specified collection.
|
||||
*
|
||||
* The returned set preserves the element iteration order of the original array.
|
||||
*
|
||||
* To get a set containing all elements that are contained at least in one of these collections use [union].
|
||||
*/
|
||||
public infix fun ByteArray.intersect(other: Iterable<Byte>): Set<Byte> {
|
||||
val set = this.toMutableSet()
|
||||
@@ -9632,9 +9636,11 @@ public infix fun ByteArray.intersect(other: Iterable<Byte>): Set<Byte> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a set containing all elements that are contained by both this set and the specified collection.
|
||||
* Returns a set containing all elements that are contained by both this array and the specified collection.
|
||||
*
|
||||
* The returned set preserves the element iteration order of the original array.
|
||||
*
|
||||
* To get a set containing all elements that are contained at least in one of these collections use [union].
|
||||
*/
|
||||
public infix fun ShortArray.intersect(other: Iterable<Short>): Set<Short> {
|
||||
val set = this.toMutableSet()
|
||||
@@ -9643,9 +9649,11 @@ public infix fun ShortArray.intersect(other: Iterable<Short>): Set<Short> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a set containing all elements that are contained by both this set and the specified collection.
|
||||
* Returns a set containing all elements that are contained by both this array and the specified collection.
|
||||
*
|
||||
* The returned set preserves the element iteration order of the original array.
|
||||
*
|
||||
* To get a set containing all elements that are contained at least in one of these collections use [union].
|
||||
*/
|
||||
public infix fun IntArray.intersect(other: Iterable<Int>): Set<Int> {
|
||||
val set = this.toMutableSet()
|
||||
@@ -9654,9 +9662,11 @@ public infix fun IntArray.intersect(other: Iterable<Int>): Set<Int> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a set containing all elements that are contained by both this set and the specified collection.
|
||||
* Returns a set containing all elements that are contained by both this array and the specified collection.
|
||||
*
|
||||
* The returned set preserves the element iteration order of the original array.
|
||||
*
|
||||
* To get a set containing all elements that are contained at least in one of these collections use [union].
|
||||
*/
|
||||
public infix fun LongArray.intersect(other: Iterable<Long>): Set<Long> {
|
||||
val set = this.toMutableSet()
|
||||
@@ -9665,9 +9675,11 @@ public infix fun LongArray.intersect(other: Iterable<Long>): Set<Long> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a set containing all elements that are contained by both this set and the specified collection.
|
||||
* Returns a set containing all elements that are contained by both this array and the specified collection.
|
||||
*
|
||||
* The returned set preserves the element iteration order of the original array.
|
||||
*
|
||||
* To get a set containing all elements that are contained at least in one of these collections use [union].
|
||||
*/
|
||||
public infix fun FloatArray.intersect(other: Iterable<Float>): Set<Float> {
|
||||
val set = this.toMutableSet()
|
||||
@@ -9676,9 +9688,11 @@ public infix fun FloatArray.intersect(other: Iterable<Float>): Set<Float> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a set containing all elements that are contained by both this set and the specified collection.
|
||||
* Returns a set containing all elements that are contained by both this array and the specified collection.
|
||||
*
|
||||
* The returned set preserves the element iteration order of the original array.
|
||||
*
|
||||
* To get a set containing all elements that are contained at least in one of these collections use [union].
|
||||
*/
|
||||
public infix fun DoubleArray.intersect(other: Iterable<Double>): Set<Double> {
|
||||
val set = this.toMutableSet()
|
||||
@@ -9687,9 +9701,11 @@ public infix fun DoubleArray.intersect(other: Iterable<Double>): Set<Double> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a set containing all elements that are contained by both this set and the specified collection.
|
||||
* Returns a set containing all elements that are contained by both this array and the specified collection.
|
||||
*
|
||||
* The returned set preserves the element iteration order of the original array.
|
||||
*
|
||||
* To get a set containing all elements that are contained at least in one of these collections use [union].
|
||||
*/
|
||||
public infix fun BooleanArray.intersect(other: Iterable<Boolean>): Set<Boolean> {
|
||||
val set = this.toMutableSet()
|
||||
@@ -9698,9 +9714,11 @@ public infix fun BooleanArray.intersect(other: Iterable<Boolean>): Set<Boolean>
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a set containing all elements that are contained by both this set and the specified collection.
|
||||
* Returns a set containing all elements that are contained by both this array and the specified collection.
|
||||
*
|
||||
* The returned set preserves the element iteration order of the original array.
|
||||
*
|
||||
* To get a set containing all elements that are contained at least in one of these collections use [union].
|
||||
*/
|
||||
public infix fun CharArray.intersect(other: Iterable<Char>): Set<Char> {
|
||||
val set = this.toMutableSet()
|
||||
@@ -9912,6 +9930,8 @@ public fun CharArray.toMutableSet(): MutableSet<Char> {
|
||||
* The returned set preserves the element iteration order of the original array.
|
||||
* Those elements of the [other] collection that are unique are iterated in the end
|
||||
* in the order of the [other] collection.
|
||||
*
|
||||
* To get a set containing all elements that are contained in both collections use [intersect].
|
||||
*/
|
||||
public infix fun <T> Array<out T>.union(other: Iterable<T>): Set<T> {
|
||||
val set = this.toMutableSet()
|
||||
@@ -9925,6 +9945,8 @@ public infix fun <T> Array<out T>.union(other: Iterable<T>): Set<T> {
|
||||
* The returned set preserves the element iteration order of the original array.
|
||||
* Those elements of the [other] collection that are unique are iterated in the end
|
||||
* in the order of the [other] collection.
|
||||
*
|
||||
* To get a set containing all elements that are contained in both collections use [intersect].
|
||||
*/
|
||||
public infix fun ByteArray.union(other: Iterable<Byte>): Set<Byte> {
|
||||
val set = this.toMutableSet()
|
||||
@@ -9938,6 +9960,8 @@ public infix fun ByteArray.union(other: Iterable<Byte>): Set<Byte> {
|
||||
* The returned set preserves the element iteration order of the original array.
|
||||
* Those elements of the [other] collection that are unique are iterated in the end
|
||||
* in the order of the [other] collection.
|
||||
*
|
||||
* To get a set containing all elements that are contained in both collections use [intersect].
|
||||
*/
|
||||
public infix fun ShortArray.union(other: Iterable<Short>): Set<Short> {
|
||||
val set = this.toMutableSet()
|
||||
@@ -9951,6 +9975,8 @@ public infix fun ShortArray.union(other: Iterable<Short>): Set<Short> {
|
||||
* The returned set preserves the element iteration order of the original array.
|
||||
* Those elements of the [other] collection that are unique are iterated in the end
|
||||
* in the order of the [other] collection.
|
||||
*
|
||||
* To get a set containing all elements that are contained in both collections use [intersect].
|
||||
*/
|
||||
public infix fun IntArray.union(other: Iterable<Int>): Set<Int> {
|
||||
val set = this.toMutableSet()
|
||||
@@ -9964,6 +9990,8 @@ public infix fun IntArray.union(other: Iterable<Int>): Set<Int> {
|
||||
* The returned set preserves the element iteration order of the original array.
|
||||
* Those elements of the [other] collection that are unique are iterated in the end
|
||||
* in the order of the [other] collection.
|
||||
*
|
||||
* To get a set containing all elements that are contained in both collections use [intersect].
|
||||
*/
|
||||
public infix fun LongArray.union(other: Iterable<Long>): Set<Long> {
|
||||
val set = this.toMutableSet()
|
||||
@@ -9977,6 +10005,8 @@ public infix fun LongArray.union(other: Iterable<Long>): Set<Long> {
|
||||
* The returned set preserves the element iteration order of the original array.
|
||||
* Those elements of the [other] collection that are unique are iterated in the end
|
||||
* in the order of the [other] collection.
|
||||
*
|
||||
* To get a set containing all elements that are contained in both collections use [intersect].
|
||||
*/
|
||||
public infix fun FloatArray.union(other: Iterable<Float>): Set<Float> {
|
||||
val set = this.toMutableSet()
|
||||
@@ -9990,6 +10020,8 @@ public infix fun FloatArray.union(other: Iterable<Float>): Set<Float> {
|
||||
* The returned set preserves the element iteration order of the original array.
|
||||
* Those elements of the [other] collection that are unique are iterated in the end
|
||||
* in the order of the [other] collection.
|
||||
*
|
||||
* To get a set containing all elements that are contained in both collections use [intersect].
|
||||
*/
|
||||
public infix fun DoubleArray.union(other: Iterable<Double>): Set<Double> {
|
||||
val set = this.toMutableSet()
|
||||
@@ -10003,6 +10035,8 @@ public infix fun DoubleArray.union(other: Iterable<Double>): Set<Double> {
|
||||
* The returned set preserves the element iteration order of the original array.
|
||||
* Those elements of the [other] collection that are unique are iterated in the end
|
||||
* in the order of the [other] collection.
|
||||
*
|
||||
* To get a set containing all elements that are contained in both collections use [intersect].
|
||||
*/
|
||||
public infix fun BooleanArray.union(other: Iterable<Boolean>): Set<Boolean> {
|
||||
val set = this.toMutableSet()
|
||||
@@ -10016,6 +10050,8 @@ public infix fun BooleanArray.union(other: Iterable<Boolean>): Set<Boolean> {
|
||||
* The returned set preserves the element iteration order of the original array.
|
||||
* Those elements of the [other] collection that are unique are iterated in the end
|
||||
* in the order of the [other] collection.
|
||||
*
|
||||
* To get a set containing all elements that are contained in both collections use [intersect].
|
||||
*/
|
||||
public infix fun CharArray.union(other: Iterable<Char>): Set<Char> {
|
||||
val set = this.toMutableSet()
|
||||
|
||||
@@ -1419,9 +1419,11 @@ public inline fun <T, K> Iterable<T>.distinctBy(selector: (T) -> K): List<T> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a set containing all elements that are contained by both this set and the specified collection.
|
||||
* Returns a set containing all elements that are contained by both this collection and the specified collection.
|
||||
*
|
||||
* The returned set preserves the element iteration order of the original collection.
|
||||
*
|
||||
* To get a set containing all elements that are contained at least in one of these collections use [union].
|
||||
*/
|
||||
public infix fun <T> Iterable<T>.intersect(other: Iterable<T>): Set<T> {
|
||||
val set = this.toMutableSet()
|
||||
@@ -1458,6 +1460,8 @@ public fun <T> Iterable<T>.toMutableSet(): MutableSet<T> {
|
||||
* The returned set preserves the element iteration order of the original collection.
|
||||
* Those elements of the [other] collection that are unique are iterated in the end
|
||||
* in the order of the [other] collection.
|
||||
*
|
||||
* To get a set containing all elements that are contained in both collections use [intersect].
|
||||
*/
|
||||
public infix fun <T> Iterable<T>.union(other: Iterable<T>): Set<T> {
|
||||
val set = this.toMutableSet()
|
||||
|
||||
@@ -113,6 +113,8 @@ object SetOps : TemplateGroupBase() {
|
||||
The returned set preserves the element iteration order of the original ${f.collection}.
|
||||
Those elements of the [other] collection that are unique are iterated in the end
|
||||
in the order of the [other] collection.
|
||||
|
||||
To get a set containing all elements that are contained in both collections use [intersect].
|
||||
"""
|
||||
}
|
||||
returns("Set<T>")
|
||||
@@ -131,9 +133,11 @@ object SetOps : TemplateGroupBase() {
|
||||
infix()
|
||||
doc {
|
||||
"""
|
||||
Returns a set containing all elements that are contained by both this set and the specified collection.
|
||||
Returns a set containing all elements that are contained by both this ${f.collection} and the specified collection.
|
||||
|
||||
The returned set preserves the element iteration order of the original ${f.collection}.
|
||||
|
||||
To get a set containing all elements that are contained at least in one of these collections use [union].
|
||||
"""
|
||||
}
|
||||
returns("Set<T>")
|
||||
|
||||
Reference in New Issue
Block a user