public static String toCommaSeparatedFormat(Set set){
  StringBuilder buff=new StringBuilder();
  boolean firstEntry=true;
  for (Iterator iter=set.iterator(); iter.hasNext(); ) {
    if (!firstEntry) {
      buff.append(", ");
    }
 else {
      firstEntry=false;
    }
    buff.append((String)iter.next());
  }
  return buff.toString();
}

public static String toCommaSeparatedFormat ( Set set ) { StringBuilder buff = new StringBuilder ( ) ; boolean firstEntry = true ; for ( Iterator iter = set . iterator ( ) ; iter . hasNext ( ) ; ) { if ( ! firstEntry ) { buff . append ( ", " ) ; } else { firstEntry = false ; } buff . append ( ( String ) iter . next ( ) ) ; } return buff . toString ( ) ; }
returns a string of comma separated strings that are contained in a set .
