Class RootDependencyIndex

  • All Implemented Interfaces:

    
    public final class RootDependencyIndex
    
                        

    A data class representing the index of a root dependency of a scope.

    Instances of this class are used to reference the direct dependencies of scopes in the shared dependency graph. These dependencies form the roots of the dependency trees spawned by scopes.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Integer getRoot() The index of the root dependency referenced by this object.
      final Integer getFragment() The index of the fragment of the dependency graph this reference points to.
      final String toKey() Generate a string key to represent this index.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RootDependencyIndex

        RootDependencyIndex(Integer root, Integer fragment)
    • Method Detail

      • getRoot

         final Integer getRoot()

        The index of the root dependency referenced by this object. Each package acting as a dependency is assigned a unique index. Storing an index rather than an identifier reduces the amount of memory consumed by this representation.

      • getFragment

         final Integer getFragment()

        The index of the fragment of the dependency graph this reference points to. This is used to distinguish between packages that occur multiple times in the dependency graph with different dependencies.

      • toKey

         final String toKey()

        Generate a string key to represent this index.