}
/**
+ * Checks whether this message has a field with the given name.
+ *
+ * @param field
+ * The name of the field to check for
+ * @return <code>true</code> if the message has a field with the given
+ * name, <code>false</code> 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.
*