code: public static Collection<NumberNamed> sortByNumber(Collection<NumberNamed> aNamedVOs)
  
     {
  
        List<NumberNamed> list;
  
        if (aNamedVOs instanceof List)
           list = (List<NumberNamed>) aNamedVOs;
        else
           list = new ArrayList<NumberNamed>(aNamedVOs);
  
        Collections.sort(list, new NumberComparator());
  
        return list;
  
     }
docs: --------------------------------------------