code: public boolean hasExtension(String namespace) {
          synchronized (packetExtensions) {
              for (ExtensionElement packetExtension : packetExtensions.values()) {
                  if (packetExtension.getNamespace().equals(namespace)) {
                      return true;
                  }
              }
          }
          return false;
      }
docs: Check if a stanza extension with the given namespace exists.
  
  @param namespace
  @return true if a stanza extension exists, false otherwise.