X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffreenet%2Fwot%2FTrust.kt;fp=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffreenet%2Fwot%2FTrust.kt;h=f54cfc31a361735bb2b616959e6fb3188668f0fe;hp=779dd205ee95700b9ee2d778d9d8d527514a8053;hb=23e09dfc13a0cc6dfc7d7b8cc09c78acc6984ec7;hpb=e1507b16a50ac9b8b497e7d151b2889c1736ee9c diff --git a/src/main/kotlin/net/pterodactylus/sone/freenet/wot/Trust.kt b/src/main/kotlin/net/pterodactylus/sone/freenet/wot/Trust.kt index 779dd20..f54cfc3 100644 --- a/src/main/kotlin/net/pterodactylus/sone/freenet/wot/Trust.kt +++ b/src/main/kotlin/net/pterodactylus/sone/freenet/wot/Trust.kt @@ -21,3 +21,6 @@ package net.pterodactylus.sone.freenet.wot * Container class for trust in the web of trust. */ data class Trust(val explicit: Int?, val implicit: Int?, val distance: Int?) + +fun trustExplicitely(value: Int) = Trust(explicit = value, implicit = null, distance = 1) +fun trustImplicitely(value: Int, distance: Int = 2) = Trust(explicit = null, implicit = value, distance)