code: public int addRank(E element, int gain) {
  
      Ranking ranking = this.map.get(element);
      if (ranking == null) {
        if (gain == 0) {
          return 0;
        }
        ranking = new Ranking();
        this.map.put(element, ranking);
      }
      ranking.addRank(gain);
      return ranking.rank;
    }
docs: This method adds the given {@code gain} to the current {@link #getRank(Object) rank} of the given {@code element}.
  If the {@code element} is {@link #setUnacceptable(Object) unacceptable}, this method will have no effect. This
  method guarantees that there will be no overflow of the {@link #getRank(Object) rank}.
  
  @param element is the element to rank.
  @param gain is the value to add to the current rank. It may be negative to reduce the rank. A value of {@code 0}
  will have no effect.
  @return the new rank.