private <T extends VCardProperty>Map<String,List<T>> orderPropertiesByGroup(List<T> properties){
  Map<String,List<T>> groupedProperties=new HashMap<>();
  for (  T property : properties) {
    String group=property.getGroup();
    if (isEmpty(group)) {
      continue;
    }
    List<T> groupPropertiesList=groupedProperties.get(group);
    if (groupPropertiesList == null) {
      groupPropertiesList=new ArrayList<T>();
      groupedProperties.put(group,groupPropertiesList);
    }
    groupPropertiesList.add(property);
  }
  return groupedProperties;
}

private < T extends VCardProperty > Map < String , List < T > > orderPropertiesByGroup ( List < T > properties ) { Map < String , List < T > > groupedProperties = new HashMap < > ( ) ; for ( T property : properties ) { String group = property . getGroup ( ) ; if ( isEmpty ( group ) ) { continue ; } List < T > groupPropertiesList = groupedProperties . get ( group ) ; if ( groupPropertiesList == null ) { groupPropertiesList = new ArrayList < T > ( ) ; groupedProperties . put ( group , groupPropertiesList ) ; } groupPropertiesList . add ( property ) ; } return groupedProperties ; }
groups properties by their group name .
