Contents
Class DependencyGraph<ECS_TYPE>
java.lang.Object
com.hypixel.hytale.component.dependency.DependencyGraph<ECS_TYPE>
- Type Parameters:
ECS_TYPE- The type of the ECS the dependency graph is for.
A directed graph representing system dependencies within an ECS.
-
Constructor Summary
ConstructorsConstructorDescriptionDependencyGraph(ISystem<ECS_TYPE>[] systems) Default Constructor for aDependencyGraphinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled to add an edge to the dependency graph.voidCalled to add an edge to the dependency graph.voidaddEdgeFromRoot(ISystem<ECS_TYPE> afterSystem, int priority) Called to add an edge from the root to the dependency graph.voidresolveEdges(ComponentRegistry<ECS_TYPE> registry) Called to resolve the edges in the dependency graph.voidCalled to sort the systems in the dependency graph.toString()
-
Constructor Details
-
DependencyGraph
Default Constructor for aDependencyGraphinstance.- Parameters:
systems- The array of systems in the ECS.
-
-
Method Details
-
getSystems
-
resolveEdges
Called to resolve the edges in the dependency graph.- Parameters:
registry- The component registry to resolve dependencies against.
-
addEdgeFromRoot
-
addEdge
public void addEdge(@Nonnull ISystem<ECS_TYPE> beforeSystem, @Nonnull ISystem<ECS_TYPE> afterSystem, int priority) Called to add an edge to the dependency graph.- Parameters:
beforeSystem- The system the edge points from.afterSystem- The system the edge points to.priority- The priority of the edge.
-
addEdge
public void addEdge(@Nonnull com.hypixel.hytale.component.dependency.DependencyGraph.Edge<ECS_TYPE> edge) Called to add an edge to the dependency graph.- Parameters:
edge- The edge to add.
-
sort
-
toString
-