X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffreenet%2Fwot%2FTrust.kt;h=f54cfc31a361735bb2b616959e6fb3188668f0fe;hb=a5c00f1b023ee87a8d3c2f2ece6b955c87e62afb;hp=779dd205ee95700b9ee2d778d9d8d527514a8053;hpb=faf66247a34f64946990a985d2ea3003465969cb;p=Sone.git 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)