From f85a8ea030d563b573acca6f1a117ec87c82cc4e Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 13 Jul 2015 19:33:05 +0200 Subject: [PATCH] Add constructor that takes an identifier --- src/main/java/net/pterodactylus/fcp/ModifyPeer.java | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/main/java/net/pterodactylus/fcp/ModifyPeer.java b/src/main/java/net/pterodactylus/fcp/ModifyPeer.java index dfc5aa2..8c911b8 100644 --- a/src/main/java/net/pterodactylus/fcp/ModifyPeer.java +++ b/src/main/java/net/pterodactylus/fcp/ModifyPeer.java @@ -25,20 +25,13 @@ package net.pterodactylus.fcp; */ public class ModifyPeer extends FcpMessage { - /** - * Creates a new “ModifyPeer” request. All Boolean parameters may be null - * to not influence the current setting. - * - * @param nodeIdentifier - * The identifier of the node, i.e. name, identity, or IP - * address and port - * @param allowLocalAddresses - * Whether to allow local addresses from this node - * @param disabled - * Whether the node is disabled - * @param listenOnly - * Whether your node should not try to connect the node - */ + public ModifyPeer(String identifier, String nodeIdentifier) { + super("ModifyPeer"); + setField("Identifier", identifier); + setField("NodeIdentifier", nodeIdentifier); + } + + @Deprecated public ModifyPeer(String nodeIdentifier, Boolean allowLocalAddresses, Boolean disabled, Boolean listenOnly) { super("ModifyPeer"); setField("NodeIdentifier", nodeIdentifier); -- 2.7.4