private boolean isSortOrderAscending(final Optional<String> sortBy){
  if (sortBy.isPresent()) {
    String sortColumn=sortBy.get();
    return !sortColumn.startsWith(SORT_ORDER_DESC);
  }
 else {
    return false;
  }
}

private boolean isSortOrderAscending ( final Optional < String > sortBy ) { if ( sortBy . isPresent ( ) ) { String sortColumn = sortBy . get ( ) ; return ! sortColumn . startsWith ( SORT_ORDER_DESC ) ; } else { return false ; } }
this returns sorting order .
