diff --git a/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/sq/Fingerprint.kt b/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/sq/Fingerprint.kt index e37b6935..f05b4ff6 100644 --- a/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/sq/Fingerprint.kt +++ b/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/sq/Fingerprint.kt @@ -4,7 +4,7 @@ package org.pgpainless.wot.dijkstra.sq -class Fingerprint(fingerprint: String) { +class Fingerprint(fingerprint: String) : Comparable { val fingerprint: String @@ -12,6 +12,10 @@ class Fingerprint(fingerprint: String) { this.fingerprint = fingerprint.uppercase() } + override fun compareTo(other: Fingerprint): Int { + return fingerprint.compareTo(other.fingerprint) + } + override fun equals(other: Any?): Boolean { return other?.toString() == toString() }