Class Dependency<ECS_TYPE>

java.lang.Object
com.hypixel.hytale.component.dependency.Dependency<ECS_TYPE>
Type Parameters:
ECS_TYPE - The type of the ECS the dependency is for.
Direct Known Subclasses:
RootDependency, SystemDependency, SystemGroupDependency, SystemTypeDependency

public abstract class Dependency<ECS_TYPE> extends Object
An abstract representation of a dependency within the ECS.
  • Constructor Details

    • Dependency

      public Dependency(@Nonnull Order order, int priority)
      Default Constructor for a Dependency instance.
      Parameters:
      order - The order of this dependency.
      priority - The priority of this dependency.
    • Dependency

      public Dependency(@Nonnull Order order, @Nonnull OrderPriority priority)
      Constructor for a Dependency instance using an OrderPriority.
      Parameters:
      order - The order of this dependency.
      priority - The priority of this dependency.
  • Method Details

    • getOrder

      @Nonnull public Order getOrder()
      Returns:
      the order of this dependency.
    • getPriority

      public int getPriority()
      Returns:
      the priority of this dependency.
    • validate

      public abstract void validate(@Nonnull ComponentRegistry<ECS_TYPE> registry)
      Called to validate this dependency against the provided registry.
      Parameters:
      registry - The registry to validate against
    • resolveGraphEdge

      public abstract void resolveGraphEdge(@Nonnull ComponentRegistry<ECS_TYPE> registry, @Nonnull ISystem<ECS_TYPE> thisSystem, @Nonnull DependencyGraph<ECS_TYPE> graph)
      Adds this dependency into the dependency graph as a backwards dependency. (The key in the map runs after on the systems in the set)
      Parameters:
      registry - the registry the systems are a part of
      thisSystem - the system this dependency is from
      graph - the dependency graph
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object