Skip to content

Commit

Permalink
Add equals for EtsClassImpl (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lipen authored Aug 21, 2024
1 parent 85e4d67 commit 549cc20
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions jacodb-ets/src/main/kotlin/org/jacodb/ets/model/EtsClass.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,17 @@ class EtsClassImpl(
override fun toString(): String {
return signature.toString()
}

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

other as EtsClassImpl

return signature == other.signature
}

override fun hashCode(): Int {
return signature.hashCode()
}
}

0 comments on commit 549cc20

Please sign in to comment.