title: Comparator not applicable for arguments
body: <p>I get the following error in this </p>
  
  <pre><code>Collection&lt;RatingDTO&gt; ratings = question.
  RatingsComparator comparator = new RatingsComparator();
  Collections.sort(ratings, comparator);
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>The method sort(List&lt;T&gt;, Comparator&lt;? super T&gt;) in the type Collections is not applicable for the arguments (Collection&lt;RatingDTO&gt;, RatingsComparator)
  </code></pre>
  
  <p><strong>RatingDTO</strong></p>
  
  <pre><code>import lombok.Data;
  
  @Data
  public class RatingDTO {
      private Double value;
      private Integer weekNumber;
      private Double total = 0d;
      private int numberOfAnswers = 0;
  
      public void addRating(Integer rating) {
          numberOfAnswers++;
          total += rating;
          value = total / numberOfAnswers;
      }
  }
  </code></pre>
  
  <p><strong>RatingsComparator</strong></p>
  
  <pre><code>public class RatingsComparator implements Comparator&lt;RatingDTO&gt; {
      public enum Order {
          WEEK_NUMBER, AVG_RATING, AMOUNT_OF_ANSWERS
      }
  
      private Order sortingBy = Order.WEEK_NUMBER;
  
      @Override
      public int compare(RatingDTO rating1, RatingDTO rating2) {
          switch (sortingBy) {
          case WEEK_NUMBER:
              return rating1.getWeekNumber().compareTo(rating2.getWeekNumber());
          case AVG_RATING:
              return rating1.getValue().compareTo(rating2.getValue());
          case AMOUNT_OF_ANSWERS:
              return rating1.getTotal().compareTo(rating2.getTotal());
          }
          throw new RuntimeException("Practically unreachable code, can't be thrown");
      }
  }
  </code></pre>
  
  <p>What am I forgetting? Thanks in advance for enlightning me.</p>