code: private void resolve(T element, List<T> result) {
          Set<T> dependencies = blockedBy.get(element);
          if (dependencies != null) {
              for (T dependency : dependencies) {
                  resolve(dependency, result);
              }
              blockedBy.remove(element);
              result.add(element);
          }
      }
docs: Resolves an element.
  
  @param element
  The element.
  @param result
  The result list.