public static OptionList createOptionList(Collection collection,Locale locale,boolean bSort){
  OptionList optionList=new OptionList();
  if ((collection != null) && !collection.isEmpty()) {
    if (bSort) {
      collection=AMFormatUtils.sortItems(collection,locale);
    }
    for (Iterator iter=collection.iterator(); iter.hasNext(); ) {
      String value=(String)iter.next();
      optionList.add(value,value);
    }
  }
  return optionList;
}

public static OptionList createOptionList ( Collection collection , Locale locale , boolean bSort ) { OptionList optionList = new OptionList ( ) ; if ( ( collection != null ) && ! collection . isEmpty ( ) ) { if ( bSort ) { collection = AMFormatUtils . sortItems ( collection , locale ) ; } for ( Iterator iter = collection . iterator ( ) ; iter . hasNext ( ) ; ) { String value = ( String ) iter . next ( ) ; optionList . add ( value , value ) ; } } return optionList ; }
returns an option list object that contains options for a given collection of string .
