From a5c00f1b023ee87a8d3c2f2ece6b955c87e62afb Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 6 Dec 2022 22:36:04 +0100 Subject: [PATCH] =?utf8?q?=F0=9F=8E=A8=20Add=20methods=20to=20create=20exp?= =?utf8?q?licit=20and=20implicit=20trust=20values?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/net/pterodactylus/sone/freenet/wot/Trust.kt | 3 +++ 1 file changed, 3 insertions(+) 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) -- 2.7.4