code: public static JinxConstants.SortOrder stringToSortOrder(String sortOrderString) {
          if (JinxUtils.isNullOrEmpty(sortOrderString)) {
              return null;
          }
          JinxConstants.SortOrder retVal = null;
          String s = sortOrderString.toLowerCase().trim().replaceAll("-", "_");
          for (JinxConstants.SortOrder sortOrder : JinxConstants.SortOrder.values()) {
              if (sortOrder.toString().equals(s)) {
                  retVal = sortOrder;
                  break;
              }
          }
          return retVal;
      }
docs: Convert a Flickr sort order string to the equivalent {@link net.jeremybrooks.jinx.JinxConstants.SortOrder} enum.
  
  @param sortOrderString Flickr sort order string.
  @return SortOrder enum, or null if the parameter is null.