code: public AttributeStatement newAttributeStatement(final Map<String, Object> attributes,
                                                      final Map<String, String> attributeFriendlyNames,
                                                      final Map<String, String> attributeValueTypes,
                                                      final Map<String, String> configuredNameFormats,
                                                      final String defaultNameFormat,
                                                      final Saml20AttributeBuilder builder) {
          val attrStatement = newSamlObject(AttributeStatement.class);
          for (val e : attributes.entrySet()) {
              if (e.getValue() instanceof Collection<?> && ((Collection<?>) e.getValue()).isEmpty()) {
                  LOGGER.info("Skipping attribute [{}] because it does not have any values.", e.getKey());
                  continue;
              }
              val friendlyName = attributeFriendlyNames.getOrDefault(e.getKey(), null);
              val attribute = newAttribute(friendlyName, e.getKey(), e.getValue(),
                  configuredNameFormats, defaultNameFormat, attributeValueTypes);
              builder.build(attrStatement, attribute);
          }
  
          return attrStatement;
      }
docs: New attribute statement.
  
  @param attributes             the attributes
  @param attributeFriendlyNames the attribute friendly names
  @param attributeValueTypes    the attribute value types
  @param configuredNameFormats  the configured name formats
  @param defaultNameFormat      the default name format
  @param builder                the builder
  @return the attribute statement