code: protected static <K, T> void groupAnswer(final Map<K, List<T>> answer, T element, K value) {
          if (answer.containsKey(value)) {
              answer.get(value).add(element);
          } else {
              List<T> groupedElements = new ArrayList<T>();
              groupedElements.add(element);
              answer.put(value, groupedElements);
          }
      }
docs: Groups the current element according to the value
  
  @param answer  the map containing the results
  @param element the element to be placed
  @param value   the value according to which the element will be placed
  @since 1.5.0