This is a useful check, which can be performed via getValue()
and checking for null return, but implementations can perform
it a wee bit more quickly.
Change-Id: I2182870ca3cfba082c6cebafe947643d5e191f4a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
553dadbff0756bb7555545cd264916f6f2bd2101)
return keyValues.keySet();
}
+ /**
+ * Determine whether a particular predicate key is present.
+ *
+ * @param key Predicate key
+ * @return True if the predicate is present, false otherwise
+ * @throws NullPointerException if {@code key} is null
+ */
+ @Beta
+ public boolean containsKey(final QName key) {
+ return keyValues.containsKey(requireNonNull(key));
+ }
+
/**
* Return the predicate values in the iteration order of {@link #entrySet()}.
*