📄 Update year in file headers
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / freenet / wot / DefaultIdentity.kt
index d50a4ba..6097916 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - DefaultIdentity.java - Copyright Â© 2010–2019 David Roden
+ * Sone - DefaultIdentity.kt - Copyright Â© 2010–2020 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
@@ -22,7 +22,7 @@ import java.util.Collections.*
 /**
  * A Web of Trust identity.
  */
-open class DefaultIdentity(private val id: String, private val nickname: String, private val requestUri: String) : Identity {
+open class DefaultIdentity(private val id: String, private val nickname: String?, private val requestUri: String) : Identity {
 
        private val contexts = mutableSetOf<String>().synchronized()
        private val properties = mutableMapOf<String, String>().synchronized()
@@ -35,7 +35,7 @@ open class DefaultIdentity(private val id: String, private val nickname: String,
 
        override fun hasContext(context: String) = context in contexts
 
-       override fun setContexts(contexts: Collection<String>) {
+       override fun setContexts(contexts: Set<String>) {
                synchronized(this.contexts) {
                        this.contexts.clear()
                        this.contexts.addAll(contexts)