X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Futil%2Ffcp%2FFcpMessage.java;h=67828689ed17d9a42a5338e42e247f59115bc68b;hb=ebd531bc775036dd66a7e20abebbcb480af35491;hp=cb0c068528d756b27f4bc43d367b93d49ad343d0;hpb=31943e09ed81c5899ab6580270e46c806e635579;p=jSite2.git 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. *