override fun equals()

in vim-engine/src/main/kotlin/com/maddyhome/idea/vim/common/DigraphSequence.kt [229:249]


  override fun equals(other: Any?): Boolean {
    if (this === other) return true
    if (javaClass != other?.javaClass) return false

    other as DigraphSequence

    @Suppress("DuplicatedCode")
    if (digraphState != other.digraphState) return false
    if (digraphChar != other.digraphChar) return false
    if (codeCnt != other.codeCnt) return false
    if (codeType != other.codeType) return false
    if (codeMax != other.codeMax) return false

    if (::codeChars.isInitialized && other::codeChars.isInitialized) {
      if (!codeChars.contentEquals(other.codeChars)) return false
    } else if (::codeChars.isInitialized != other::codeChars.isInitialized) {
      return false
    }

    return true
  }