Add second constructor that takes an identifier
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Mon, 13 Jul 2015 18:59:55 +0000 (20:59 +0200)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Mon, 13 Jul 2015 18:59:55 +0000 (20:59 +0200)
src/main/java/net/pterodactylus/fcp/RemovePeer.java

index 5eae728..3f867fe 100644 (file)
@@ -25,16 +25,15 @@ package net.pterodactylus.fcp;
  */
 public class RemovePeer extends FcpMessage {
 
-       /**
-        * Creates a new “RemovePeer” command that removes the given peer.
-        *
-        * @param nodeIdentifier
-        *            The identifier of the node, i.e. its name, identity, or IP
-        *            address and port pair
-        */
+       @Deprecated
        public RemovePeer(String nodeIdentifier) {
                super("RemovePeer");
                setField("NodeIdentifier", nodeIdentifier);
        }
 
+       public RemovePeer(String identifier, String nodeIdentifier) {
+               this(nodeIdentifier);
+               setField("Identifier", identifier);
+       }
+
 }