mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
50 lines
1.2 KiB
Kotlin
50 lines
1.2 KiB
Kotlin
// Generated code. Do not modify.
|
|
|
|
package com.yandex.div.reference
|
|
|
|
import org.json.JSONArray
|
|
import org.json.JSONObject
|
|
|
|
class EntityWithArrayOfExpressions(
|
|
@JvmField val items: ExpressionList<String>, // at least 1 elements
|
|
) : Hashable {
|
|
|
|
private var _propertiesHash: Int? = null
|
|
private var _hash: Int? = null
|
|
|
|
override fun propertiesHash(): Int {
|
|
_propertiesHash?.let {
|
|
return it
|
|
}
|
|
val propertiesHash = this::class.hashCode()
|
|
_propertiesHash = propertiesHash
|
|
return propertiesHash
|
|
}
|
|
|
|
override fun hash(): Int {
|
|
_hash?.let {
|
|
return it
|
|
}
|
|
val hash =
|
|
propertiesHash() +
|
|
items.hashCode()
|
|
_hash = hash
|
|
return hash
|
|
}
|
|
|
|
fun equals(other: EntityWithArrayOfExpressions?, resolver: ExpressionResolver, otherResolver: ExpressionResolver): Boolean {
|
|
other ?: return false
|
|
return items.evaluate(resolver).compareWith(other.items.evaluate(otherResolver)) { a, b -> a == b }
|
|
}
|
|
|
|
fun copy(
|
|
items: ExpressionList<String> = this.items,
|
|
) = EntityWithArrayOfExpressions(
|
|
items = items,
|
|
)
|
|
|
|
companion object {
|
|
const val TYPE = "entity_with_array_of_expressions"
|
|
}
|
|
}
|