code: private int getPrototypeIndex(Renderer renderer) {
      int index = 0;
      for (Renderer prototype : prototypes) {
        if (prototype.getClass().equals(renderer.getClass())) {
          break;
        }
        index++;
      }
      return index;
    }
docs: Return the index associated to the Renderer.
  
  @param renderer used to search in the prototypes collection.
  @return the prototype index associated to the renderer passed as argument.