private Map<String,Set<String>> attributesToMap(Attribute[] attributes){
  Map<String,Set<String>> result=new HashMap<>();
  for (  Attribute attribute : attributes) {
    result.put(attribute.getName(),new HashSet<>(Arrays.asList(attribute.getValues())));
  }
  return result;
}

private Map < String , Set < String > > attributesToMap ( Attribute [ ] attributes ) { Map < String , Set < String > > result = new HashMap < > ( ) ; for ( Attribute attribute : attributes ) { result . put ( attribute . getName ( ) , new HashSet < > ( Arrays . asList ( attribute . getValues ( ) ) ) ) ; } return result ; }
convert attributes into a map .
