private int compareValues(Object val1, Object val2, SortRequest.Order order) {
      if (order == SortRequest.Order.ASC) {
        return compareValues(val1, val2);
      } else {
        return -1 * compareValues(val1, val2);
      }
    }
Sort by properties.
@param sortRequest @SortRequest to sort by.
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterControllerImpl.java