🔥 Remove unnecessary imports
[Sone.git] / src / main / java / net / pterodactylus / sone / freenet / wot / Identity.java
index c6875e9..63bceb1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - Identity.java - Copyright Â© 2010–2015 David Roden
+ * Sone - Identity.java - 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
 
 package net.pterodactylus.sone.freenet.wot;
 
-import java.util.Collection;
-import java.util.Collections;
 import java.util.Map;
 import java.util.Set;
 
-import com.google.common.base.Function;
-
 /**
  * Interface for web of trust identities, defining all functions that can be
  * performed on an identity. An identity is only a container for identity data
  * and will not perform any updating in the WebOfTrust plugin itself.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David â€˜Bombe’ Roden</a>
  */
 public interface Identity {
 
-       public static final Function<Identity, Set<String>> TO_CONTEXTS = new Function<Identity, Set<String>>() {
-               @Override
-               public Set<String> apply(Identity identity) {
-                       return (identity == null) ? Collections.<String>emptySet() : identity.getContexts();
-               }
-       };
-
-       public static final Function<Identity, Map<String, String>> TO_PROPERTIES = new Function<Identity, Map<String, String>>() {
-               @Override
-               public Map<String, String> apply(Identity input) {
-                       return (input == null) ? Collections.<String, String>emptyMap() : input.getProperties();
-               }
-       };
-
        /**
         * Returns the ID of the identity.
         *
@@ -99,7 +79,7 @@ public interface Identity {
         * @param contexts
         *            All contexts of the identity
         */
-       public void setContexts(Collection<String> contexts);
+       public void setContexts(Set<String> contexts);
 
        /**
         * Removes the given context from this identity.