code: private void addAttributes(Map attributes)
    {
      if(attributes == null)
        return;
  
      Iterator iter = attributes.keySet().iterator();
      while(iter.hasNext())
      {
        String attrName = (String) iter.next();
        Object attrValue = attributes.get(attrName);
        if(attrValue != null)
          addAttribute(attrName, attrValue.toString());
      }
    }
docs: Adds the attributes. All the properties will be used as attributes
  
  @param attributes the attributes to add