All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vladsch.flexmark.util.dependency.FlatDependencyHandler Maven / Gradle / Ivy

The newest version!
package com.vladsch.flexmark.util.dependency;

import java.util.List;
import java.util.function.Function;
import org.jetbrains.annotations.NotNull;

/**
 * @deprecated use {@link DependencyResolver#resolveFlatDependencies(List, Function, Function)} use
 *     null for functions if no need for sort or class extractor
 */
@Deprecated
public class FlatDependencyHandler
    extends DependencyHandler, FlatDependencies> {
  public List resolvedDependencies(List dependentsList) {
    FlatDependencies dependencies = resolveDependencies(dependentsList);
    return dependencies.dependencies;
  }

  @NotNull
  @Override
  protected FlatDependencyStage createStage(List dependents) {
    return new FlatDependencyStage<>(dependents);
  }

  @NotNull
  @Override
  protected Class getDependentClass(T dependent) {
    return (Class) dependent.getClass();
  }

  @NotNull
  @Override
  protected FlatDependencies createResolvedDependencies(List> stages) {
    return new FlatDependencies<>(stages);
  }

  public static  List computeDependencies(List dependentsList) {
    FlatDependencyHandler resolver = new FlatDependencyHandler<>();
    return resolver.resolvedDependencies(dependentsList);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy