DependencyGraph

public class DependencyGraph

Class DependencyGraph. Provides dependencygraph functionality for the Hytale server.

java.lang.Object > DependencyGraph

Field Summary

edges

private Edge[] edges

Field edges.

system

final ISystem system

Field system.

index

final int index

Field index.

oldLength

final int oldLength

Field oldLength.

newLength

final int newLength

Field newLength.

fulfilled

private boolean fulfilled

Field fulfilled.

resolved

private boolean resolved

Field resolved.

Method Detail

DependencyGraph

public public DependencyGraph (@Nonnull final ISystem[] systems)

Method DependencyGraph.

Parameters:
@Nonnull final ISystem[] systems

getSystems

public ISystem[] getSystems ()

Method getSystems.

resolveEdges

public void resolveEdges (@Nonnull final ComponentRegistry registry)

Method resolveEdges.

Parameters:
@Nonnull final ComponentRegistry registry

addEdgeFromRoot

public void addEdgeFromRoot (@Nonnull final ISystem afterSystem, final int priority)

Method addEdgeFromRoot.

Parameters:
@Nonnull final ISystem afterSystem
final int priority

addEdge

public void addEdge (@Nonnull final ISystem beforeSystem, @Nonnull final ISystem afterSystem, final int priority)

Method addEdge.

Parameters:
@Nonnull final ISystem beforeSystem
@Nonnull final ISystem afterSystem
final int priority

sort

public void sort (final ISystem[] sortedSystems)

Method sort.

Parameters:
final ISystem[] sortedSystems

IllegalArgumentException

public new IllegalArgumentException ("Found a cyclic dependency!" + String.valueOf(this)

Method IllegalArgumentException.

Parameters:
"Found a cyclic dependency!" + String.valueOf(this

hasEdgeOfLaterPriority

private boolean hasEdgeOfLaterPriority (final ISystem system, final int priority)

Method hasEdgeOfLaterPriority.

Parameters:
final ISystem system
final int priority

resolveEdgesFor

private void resolveEdgesFor (final ISystem system)

Method resolveEdgesFor.

Parameters:
final ISystem system

fulfillEdgesFor

private void fulfillEdgesFor (final ISystem system)

Method fulfillEdgesFor.

Parameters:
final ISystem system

toString

public String toString ()

Method toString.

emptyArray

static Edge[] emptyArray ()

Method emptyArray.

Edge

public public Edge (@Nullable final ISystem beforeSystem, final ISystem afterSystem, final int priority)

Method Edge.

Parameters:
@Nullable final ISystem beforeSystem
final ISystem afterSystem
final int priority

compareTo

public int compareTo (@Nonnull final Edge o)

Method compareTo.

Parameters:
@Nonnull final Edge o