User Tools

Site Tools


playground:javatest

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
playground:javatest [2018/08/01 09:54]
els removed
— (current)
Line 1: Line 1:
-<​Code:​java>​ 
-   ​private Element createSvg() { 
-        var svgRoot = createSvgRoot();​ 
-        for (Element rasterLine : createRaster()) { 
-            svgRoot.appendChild(rasterLine);​ 
-        } 
-        var defs = doc.createElement("​defs"​);​ 
-        defs.setAttribute("​id",​ "​defsId"​);​ 
-        defs.appendChild(createSwitchLeft());​ 
-        defs.appendChild(createSwitchRight());​ 
-        svgRoot.appendChild(defs);​ 
  
-        final List<​String>​ fileLines = readAllLines();​ 
-        for (Tracks track : Tracks.values()) { 
-            final List<​Element>​ elements = fileLines.stream() 
-                    .filter(track::​filter) 
-                    .map(track::​transform) 
-                    .map(creator -> creator.build(doc)) 
-                    .collect(toList());​ 
-            for (Element element : elements) { 
-                svgRoot.appendChild(element);​ 
-            } 
-        } 
-        return svgRoot; 
-    } 
-</​Code>​