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 ; }
Sorts the set of Member Objects