mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-24 11:57:59 +01:00
Depth: Add fun value() to get the raw value
This commit is contained in:
parent
7032fe4a97
commit
31e7704f89
1 changed files with 9 additions and 0 deletions
|
@ -49,6 +49,15 @@ class Depth private constructor(val limit: Int?) : Comparable<Depth> {
|
||||||
return limit == null
|
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.
|
* Decrease the trust depth by one and return the result.
|
||||||
* If the [Depth] is unconstrained, the result will still be unconstrained.
|
* If the [Depth] is unconstrained, the result will still be unconstrained.
|
||||||
|
|
Loading…
Reference in a new issue