code: public List<Entity> sortEntities(List<Entity> entities) {
          if (entities != null && entities.size() > 0) {
              Entity[] ents = (Entity[]) entities.toArray(new Entity[entities.size()]);
              WIMSortCompare<Entity> wimSortComparator = new WIMSortCompare<Entity>(sortControl);
              Arrays.sort(ents, wimSortComparator);
              entities.clear();
              for (int i = 0; i < ents.length; i++) {
                  entities.add(ents[i]);
              }
          }
          return entities;
      }
docs: Sorts the set of Member Objects
  
  @param members a set of Member objects to be sorted
  @return a list of sorted Member objects