@Override
    protected Graph doConvert(final Set<ClassDoc> toConvert) {

        final ClassDoc[] clDocs = toConvert.toArray(new ClassDoc[toConvert.size()]);
        final SortedMap<PackageDoc, SortedSet<ClassDoc>> clPerPackage = Comparators.sortClassesPerPackage(clDocs);

        final Map.Entry<PackageDoc, SortedSet<ClassDoc>> packageAndClasses = clPerPackage
                .entrySet()
                .stream()
                .filter(e -> relevantPackage.getName().equalsIgnoreCase(e.getKey().name()))
                .findFirst()
                .orElseThrow(() -> new IllegalStateException("No retrieved classes in expected package ["
                        + relevantPackage.getName() + "]. Found: "
                        + clPerPackage.keySet().stream().map(Doc::name).reduce((l, r) -> l + ", r")
                        .orElse("<none>")));

        final PackageDoc packageDoc = packageAndClasses.getKey();
        final SortedSet<ClassDoc> classDocs = packageAndClasses.getValue();

        // Create the Graph.
        final Graph toReturn = new Graph("Graph_" + packageDoc.name(), true, true);

        final Subgraph packageSubgraph = new Subgraph(packageDoc.name());
        final CommonGraphAttributes subgraphAttrs = new CommonGraphAttributes();
        packageSubgraph.add(subgraphAttrs);

        final GraphAttributes subAttrs = subgraphAttrs.getAttributes();
        subAttrs.label = "Package: " + packageDoc.name();

        // Add a Subgraph for the package
        toReturn.add(renderPackageSubGraph(classDocs));

        // All Done.
        return toReturn;
    }
@Override
    protected Graph doConvert(final Set<ClassDoc> toConvert) {

        final ClassDoc[] clDocs = toConvert.toArray(new ClassDoc[toConvert.size()]);
        final SortedMap<PackageDoc, SortedSet<ClassDoc>> clPerPackage = Comparators.sortClassesPerPackage(clDocs);

        final Map.Entry<PackageDoc, SortedSet<ClassDoc>> packageAndClasses = clPerPackage
                .entrySet()
                .stream()
                .filter(e -> relevantPackage.getName().equalsIgnoreCase(e.getKey().name()))
                .findFirst()
                .orElseThrow(() -> new IllegalStateException("No retrieved classes in expected package ["
                        + relevantPackage.getName() + "]. Found: "
                        + clPerPackage.keySet().stream().map(Doc::name).reduce((l, r) -> l + ", r")
                        .orElse("<none>")));

        final PackageDoc packageDoc = packageAndClasses.getKey();
        final SortedSet<ClassDoc> classDocs = packageAndClasses.getValue();

        
        final Graph toReturn = new Graph("Graph_" + packageDoc.name(), true, true);

        final Subgraph packageSubgraph = new Subgraph(packageDoc.name());
        final CommonGraphAttributes subgraphAttrs = new CommonGraphAttributes();
        packageSubgraph.add(subgraphAttrs);

        final GraphAttributes subAttrs = subgraphAttrs.getAttributes();
        subAttrs.label = "Package: " + packageDoc.name();

        
        toReturn.add(renderPackageSubGraph(classDocs));

        
        return toReturn;
    }
@ Override protected Graph doConvert ( final Set < ClassDoc > toConvert ) { final ClassDoc [ ] clDocs = toConvert . toArray ( new ClassDoc [ toConvert . size ( ) ] ) ; final SortedMap < PackageDoc , SortedSet < ClassDoc > > clPerPackage = Comparators . sortClassesPerPackage ( clDocs ) ; final Map . Entry < PackageDoc , SortedSet < ClassDoc > > packageAndClasses = clPerPackage . entrySet ( ) . stream ( ) . filter ( e -> relevantPackage . getName ( ) . equalsIgnoreCase ( e . getKey ( ) . name ( ) ) ) . findFirst ( ) . orElseThrow ( ( ) -> new IllegalStateException ( "No retrieved classes in expected package [" + relevantPackage . getName ( ) + "]. Found: " + clPerPackage . keySet ( ) . stream ( ) . map ( Doc :: name ) . reduce ( ( l , r ) -> l + ", r" ) . orElse ( "<none>" ) ) ) ; final PackageDoc packageDoc = packageAndClasses . getKey ( ) ; final SortedSet < ClassDoc > classDocs = packageAndClasses . getValue ( ) ; // Create the Graph. final Graph toReturn = new Graph ( "Graph_" + packageDoc . name ( ) , true , true ) ; final Subgraph packageSubgraph = new Subgraph ( packageDoc . name ( ) ) ; final CommonGraphAttributes subgraphAttrs = new CommonGraphAttributes ( ) ; packageSubgraph . add ( subgraphAttrs ) ; final GraphAttributes subAttrs = subgraphAttrs . getAttributes ( ) ; subAttrs . label = "Package: " + packageDoc . name ( ) ; // Add a Subgraph for the package toReturn . add ( renderPackageSubGraph ( classDocs ) ) ; // All Done. return toReturn ; }
{@inheritDoc}
{