public Set < Dependency > asSet ( boolean withChildren ) { if ( withChildren ) { Set < Dependency > dependencySet = new HashSet <> ( ) ; List < Dependency > dependencyList = asList ( false ) ; dependencySet . addAll ( dependencyList ) ; for ( Dependency dependency : dependencyList ) { if ( dependency . isInternal ( ) ) { dependencySet . addAll ( dependency . getDependencies ( ) . asSet ( ) ) ; } } return dependencySet ; } else { return new HashSet <> ( list ) ; } }
Returns the dependencies as a set