From f8dd2e5b5a74c2e4d49cb22fc89befd7325ec485 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 9 Apr 2008 17:22:56 +0000 Subject: [PATCH] add hasField(String) git-svn-id: http://trooper/svn/projects/jSite/trunk@672 c3eda9e8-030b-0410-8277-bc7414b0a119 --- src/net/pterodactylus/util/fcp/FcpMessage.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/net/pterodactylus/util/fcp/FcpMessage.java b/src/net/pterodactylus/util/fcp/FcpMessage.java index cb0c068..6782868 100644 --- a/src/net/pterodactylus/util/fcp/FcpMessage.java +++ b/src/net/pterodactylus/util/fcp/FcpMessage.java @@ -87,6 +87,18 @@ public class FcpMessage implements Iterable { } /** + * Checks whether this message has a field with the given name. + * + * @param field + * The name of the field to check for + * @return true if the message has a field with the given + * name, false otherwise + */ + public boolean hasField(String field) { + return fields.containsKey(field); + } + + /** * Sets the field with the given name to the given value. If the field * already exists in this message it is overwritten. * -- 2.7.4