public ArrayList < Field > getOrderedFields ( ) { try { if ( isOrdered ( ) ) { ArrayList < Field > r = new ArrayList < Field > ( getAllFields ( ) ) ; Collections . sort ( r , new FieldComparator ( getOrder ( ) ) ) ; return r ; } } catch ( Exception e ) { getPm ( ) . error ( e ) ; } return getAllFields ( ) ; }
This method sorts the fields and returns them