diff --git a/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/sq/Depth.kt b/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/sq/Depth.kt index 2ca59152..9e43c0ad 100644 --- a/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/sq/Depth.kt +++ b/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/sq/Depth.kt @@ -93,7 +93,19 @@ class Depth(val limit: Int?) : Comparable { } } + override fun equals(other: Any?): Boolean { + if (other !is Depth) { + return false + } + + return limit == other.limit + } + override fun toString() : String { return if (isUnconstrained()) { "unconstrained" } else { limit!!.toString() } } + + override fun hashCode(): Int { + return limit ?: 0 + } } \ No newline at end of file