code: public static <T, R1, R2> Map<R1, Map<R2, T>> groupByTwoKey(
              Collection<T> collection, Function<T, R1> classifier1,
              Function<T, R2> classifier2) {
          return collection.stream()
                  .collect(groupingBy(classifier1, toMap(classifier2, t -> t)));
      }
docs: Group by two key map.
  
  @param <T>         the type parameter
  @param <R1>        the type parameter
  @param <R2>        the type parameter
  @param collection  the collection
  @param classifier1 the classifier 1
  @param classifier2 the classifier 2
  @return the map