code: public static ComparatorItem fromSortOrder(Sort.Order sortOrder) {
      if (sortOrder == null || sortOrder.getProperty() == null
          || sortOrder.getProperty().trim().length() == 0) {
        return null;
      }
      boolean nullIsFirst = Sort.NullHandling.NULLS_FIRST.equals(sortOrder.getNullHandling());
      return new ComparatorItem(sortOrder.getProperty(), sortOrder.isAscending(),
          sortOrder.isIgnoreCase(),
          nullIsFirst);
    }
docs: Transforms a {@code Sort.Order} object into a comparator item.
  
  @param sortOrder the {@code Sort.Order} object
  @return the comparator item