private SortKey toggle ( SortKey key ) { if ( key . getSortOrder ( ) == SortOrder . ASCENDING ) { return new SortKey ( key . getColumn ( ) , SortOrder . DESCENDING ) ; } return new SortKey ( key . getColumn ( ) , SortOrder . ASCENDING ) ; }
Toggle the given key between ASCENDING and DESCENDING