docs: public static <K, V> Map<V, K> invert(Map<K, V> pSource, Map<V, K> pResult, DuplicateHandler<K> pHandler) {
          if (pSource == null) {
              throw new IllegalArgumentException("source == null");
          }
  
          Map<V, K> result = pResult;
          if (result == null) {
              try {
                  //noinspection unchecked
                  result = pSource.getClass().newInstance();
              }
              catch (InstantiationException e) {
                  // Handled below
              }
              catch (IllegalAccessException e) {
                  // Handled below
              }
  
              if (result == null) {
                  throw new IllegalArgumentException("result == null and source class " + pSource.getClass() + " cannot be instantiated.");
              }
          }
  
          // Copy entries into result map, inversed
          Set<Map.Entry<K, V>> entries = pSource.entrySet();
          for (Map.Entry<K, V> entry : entries) {
              V newKey = entry.getValue();
              K newValue = entry.getKey();
  
              // Handle dupliates
              if (result.containsKey(newKey)) {
                  if (pHandler != null) {
                      newValue = pHandler.resolve(result.get(newKey), newValue);
                  }
                  else {
                      throw new IllegalArgumentException("Result would include duplicate keys, but no DuplicateHandler specified.");
                  }
              }
  
              result.put(newKey, newValue);
          }
  
          return result;
      }