static void removeDuplicateAffix(List<String> strList,boolean isSuffix){
  HashSet<String> strSet=new HashSet<String>(strList);
  strList.clear();
  strList.addAll(strSet);
  if (isSuffix) {
    Collections.sort(strList,null);
  }
 else {
    Collections.sort(strList,null);
  }
}

static void removeDuplicateAffix ( List < String > strList , boolean isSuffix ) { HashSet < String > strSet = new HashSet < String > ( strList ) ; strList . clear ( ) ; strList . addAll ( strSet ) ; if ( isSuffix ) { Collections . sort ( strList , null ) ; } else { Collections . sort ( strList , null ) ; } }
this function removes duplicates in prefix / suffix list .
