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 1b747f20..9c0bbe0d 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 @@ -49,6 +49,15 @@ class Depth private constructor(val limit: Int?) : Comparable { return limit == null } + /** + * The value of this Depth, as used in OpenPGP. + * + * Unlimited is 255. + */ + fun value(): Int { + return limit ?: 255 + } + /** * Decrease the trust depth by one and return the result. * If the [Depth] is unconstrained, the result will still be unconstrained.