mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-25 04:17:59 +01:00
Depth: Add fun value() to get the raw value
This commit is contained in:
parent
f09ea00fdd
commit
218990c3fe
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