projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🎨 Add methods to create explicit and implicit trust values
[Sone.git]
/
src
/
main
/
kotlin
/
net
/
pterodactylus
/
sone
/
freenet
/
wot
/
Trust.kt
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
aa6b04e
..
f54cfc3
100644
(file)
--- a/
src/main/kotlin/net/pterodactylus/sone/freenet/wot/Trust.kt
+++ b/
src/main/kotlin/net/pterodactylus/sone/freenet/wot/Trust.kt
@@
-1,5
+1,5
@@
/*
/*
- * Sone - Trust.kt - Copyright © 2010–20
19
David Roden
+ * Sone - Trust.kt - Copyright © 2010–20
20
David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-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?)
* 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)