contentDeepEquals
Checks if the two specified arrays are deeply equal to one another.
Two arrays are considered deeply equal if they have the same size, and elements at corresponding indices are deeply equal. That is, if two corresponding elements are nested arrays, they are also compared deeply. Elements of other types are compared for equality using the equals function. For floating point numbers, this means NaN
is equal to itself and -0.0
is not equal to 0.0
.
If any of the arrays contain themselves at any nesting level, the behavior is undefined.
Since Kotlin
1.1Return
true
if the two arrays are deeply equal, false
otherwise.
Parameters
the array to compare deeply with this array.
Samples
import kotlin.test.*
fun main() {
//sampleStart
val identityMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, 1)
)
val reflectionMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, -1)
)
// the elements at index [1][1] are not equal
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // false
reflectionMatrix[1][1] = 1
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // true
//sampleEnd
}
Checks if the two specified arrays are deeply equal to one another.
Two arrays are considered deeply equal if they have the same size, and elements at corresponding indices are deeply equal. That is, if two corresponding elements are nested arrays, they are also compared deeply. Elements of other types are compared for equality using the equals function. For floating point numbers, this means NaN
is equal to itself and -0.0
is not equal to 0.0
.
The arrays are also considered deeply equal if both are null
.
If any of the arrays contain themselves at any nesting level, the behavior is undefined.
Since Kotlin
1.4Return
true
if the two arrays are deeply equal, false
otherwise.
Parameters
the array to compare deeply with this array.
Samples
import kotlin.test.*
fun main() {
//sampleStart
val identityMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, 1)
)
val reflectionMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, -1)
)
// the elements at index [1][1] are not equal
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // false
reflectionMatrix[1][1] = 1
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // true
//sampleEnd
}
Checks if the two specified arrays are deeply equal to one another.
Two arrays are considered deeply equal if they have the same size, and elements at corresponding indices are deeply equal. That is, if two corresponding elements are nested arrays, they are also compared deeply. Elements of other types are compared for equality using the equals function. For floating point numbers, this means NaN
is equal to itself and -0.0
is not equal to 0.0
.
If any of the arrays contain themselves at any nesting level, the behavior is undefined.
Since Kotlin
1.1Return
true
if the two arrays are deeply equal, false
otherwise.
Parameters
the array to compare deeply with this array.
Samples
import kotlin.test.*
fun main() {
//sampleStart
val identityMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, 1)
)
val reflectionMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, -1)
)
// the elements at index [1][1] are not equal
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // false
reflectionMatrix[1][1] = 1
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // true
//sampleEnd
}
Checks if the two specified arrays are deeply equal to one another.
Two arrays are considered deeply equal if they have the same size, and elements at corresponding indices are deeply equal. That is, if two corresponding elements are nested arrays, they are also compared deeply. Elements of other types are compared for equality using the equals function. For floating point numbers, this means NaN
is equal to itself and -0.0
is not equal to 0.0
.
The arrays are also considered deeply equal if both are null
.
If any of the arrays contain themselves at any nesting level, the behavior is undefined.
Since Kotlin
1.4Return
true
if the two arrays are deeply equal, false
otherwise.
Parameters
the array to compare deeply with this array.
Samples
import kotlin.test.*
fun main() {
//sampleStart
val identityMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, 1)
)
val reflectionMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, -1)
)
// the elements at index [1][1] are not equal
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // false
reflectionMatrix[1][1] = 1
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // true
//sampleEnd
}
Checks if the two specified arrays are deeply equal to one another.
Two arrays are considered deeply equal if they have the same size, and elements at corresponding indices are deeply equal. That is, if two corresponding elements are nested arrays, they are also compared deeply. Elements of other types are compared for equality using the equals function. For floating point numbers, this means NaN
is equal to itself and -0.0
is not equal to 0.0
.
If any of the arrays contain themselves at any nesting level, the behavior is undefined.
Since Kotlin
1.1Return
true
if the two arrays are deeply equal, false
otherwise.
Parameters
the array to compare deeply with this array.
Samples
import kotlin.test.*
fun main() {
//sampleStart
val identityMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, 1)
)
val reflectionMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, -1)
)
// the elements at index [1][1] are not equal
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // false
reflectionMatrix[1][1] = 1
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // true
//sampleEnd
}
Checks if the two specified arrays are deeply equal to one another.
Two arrays are considered deeply equal if they have the same size, and elements at corresponding indices are deeply equal. That is, if two corresponding elements are nested arrays, they are also compared deeply. Elements of other types are compared for equality using the equals function. For floating point numbers, this means NaN
is equal to itself and -0.0
is not equal to 0.0
.
The arrays are also considered deeply equal if both are null
.
If any of the arrays contain themselves at any nesting level, the behavior is undefined.
Since Kotlin
1.4Return
true
if the two arrays are deeply equal, false
otherwise.
Parameters
the array to compare deeply with this array.
Samples
import kotlin.test.*
fun main() {
//sampleStart
val identityMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, 1)
)
val reflectionMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, -1)
)
// the elements at index [1][1] are not equal
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // false
reflectionMatrix[1][1] = 1
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // true
//sampleEnd
}
Checks if the two specified arrays are deeply equal to one another.
Two arrays are considered deeply equal if they have the same size, and elements at corresponding indices are deeply equal. That is, if two corresponding elements are nested arrays, they are also compared deeply. Elements of other types are compared for equality using the equals function. For floating point numbers, this means NaN
is equal to itself and -0.0
is not equal to 0.0
.
If any of the arrays contain themselves at any nesting level, the behavior is undefined.
Since Kotlin
1.3Return
true
if the two arrays are deeply equal, false
otherwise.
Parameters
the array to compare deeply with this array.
Samples
import kotlin.test.*
fun main() {
//sampleStart
val identityMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, 1)
)
val reflectionMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, -1)
)
// the elements at index [1][1] are not equal
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // false
reflectionMatrix[1][1] = 1
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // true
//sampleEnd
}
Checks if the two specified arrays are deeply equal to one another.
Two arrays are considered deeply equal if they have the same size, and elements at corresponding indices are deeply equal. That is, if two corresponding elements are nested arrays, they are also compared deeply. Elements of other types are compared for equality using the equals function. For floating point numbers, this means NaN
is equal to itself and -0.0
is not equal to 0.0
.
The arrays are also considered deeply equal if both are null
.
If any of the arrays contain themselves at any nesting level, the behavior is undefined.
Since Kotlin
1.4Return
true
if the two arrays are deeply equal, false
otherwise.
Parameters
the array to compare deeply with this array.
Samples
import kotlin.test.*
fun main() {
//sampleStart
val identityMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, 1)
)
val reflectionMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, -1)
)
// the elements at index [1][1] are not equal
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // false
reflectionMatrix[1][1] = 1
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // true
//sampleEnd
}
Checks if the two specified arrays are deeply equal to one another.
Two arrays are considered deeply equal if they have the same size, and elements at corresponding indices are deeply equal. That is, if two corresponding elements are nested arrays, they are also compared deeply. Elements of other types are compared for equality using the equals function. For floating point numbers, this means NaN
is equal to itself and -0.0
is not equal to 0.0
.
If any of the arrays contain themselves at any nesting level, the behavior is undefined.
Since Kotlin
1.8Return
true
if the two arrays are deeply equal, false
otherwise.
Parameters
the array to compare deeply with this array.
Samples
import kotlin.test.*
fun main() {
//sampleStart
val identityMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, 1)
)
val reflectionMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, -1)
)
// the elements at index [1][1] are not equal
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // false
reflectionMatrix[1][1] = 1
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // true
//sampleEnd
}
Checks if the two specified arrays are deeply equal to one another.
Two arrays are considered deeply equal if they have the same size, and elements at corresponding indices are deeply equal. That is, if two corresponding elements are nested arrays, they are also compared deeply. Elements of other types are compared for equality using the equals function. For floating point numbers, this means NaN
is equal to itself and -0.0
is not equal to 0.0
.
The arrays are also considered deeply equal if both are null
.
If any of the arrays contain themselves at any nesting level, the behavior is undefined.
Since Kotlin
1.8Return
true
if the two arrays are deeply equal, false
otherwise.
Parameters
the array to compare deeply with this array.
Samples
import kotlin.test.*
fun main() {
//sampleStart
val identityMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, 1)
)
val reflectionMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, -1)
)
// the elements at index [1][1] are not equal
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // false
reflectionMatrix[1][1] = 1
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // true
//sampleEnd
}
Checks if the two specified arrays are deeply equal to one another.
Two arrays are considered deeply equal if they have the same size, and elements at corresponding indices are deeply equal. That is, if two corresponding elements are nested arrays, they are also compared deeply. Elements of other types are compared for equality using the equals function. For floating point numbers, this means NaN
is equal to itself and -0.0
is not equal to 0.0
.
If any of the arrays contain themselves at any nesting level, the behavior is undefined.
Since Kotlin
1.8Return
true
if the two arrays are deeply equal, false
otherwise.
Parameters
the array to compare deeply with this array.
Samples
import kotlin.test.*
fun main() {
//sampleStart
val identityMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, 1)
)
val reflectionMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, -1)
)
// the elements at index [1][1] are not equal
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // false
reflectionMatrix[1][1] = 1
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // true
//sampleEnd
}
Checks if the two specified arrays are deeply equal to one another.
Two arrays are considered deeply equal if they have the same size, and elements at corresponding indices are deeply equal. That is, if two corresponding elements are nested arrays, they are also compared deeply. Elements of other types are compared for equality using the equals function. For floating point numbers, this means NaN
is equal to itself and -0.0
is not equal to 0.0
.
The arrays are also considered deeply equal if both are null
.
If any of the arrays contain themselves at any nesting level, the behavior is undefined.
Since Kotlin
1.8Return
true
if the two arrays are deeply equal, false
otherwise.
Parameters
the array to compare deeply with this array.
Samples
import kotlin.test.*
fun main() {
//sampleStart
val identityMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, 1)
)
val reflectionMatrix = arrayOf(
intArrayOf(1, 0),
intArrayOf(0, -1)
)
// the elements at index [1][1] are not equal
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // false
reflectionMatrix[1][1] = 1
println(identityMatrix.contentDeepEquals(reflectionMatrix)) // true
//sampleEnd
}