private void printVertexOrEdgeProperties()

in src/main/java/org/apache/commons/graph/export/DotExporter.java [126:142]


    private void printVertexOrEdgeProperties( Map<String, Object> properties )
    {
        if ( !properties.isEmpty() )
        {
            int countAddedProperties = 0;
            printWriter.write( " [" );

            for ( Entry<String, Object> property : properties.entrySet() )
            {
                String formattedString = countAddedProperties == properties.size() - 1 ? "%s=\"%s\"" : "%s=\"%s\" ";
                printWriter.format( formattedString, property.getKey(), property.getValue() );
                countAddedProperties++;
            }

            printWriter.format( "];%n" );
        }
    }