(columnNames)
| 15853 | } |
| 15854 | // todo: preserve subclasses! |
| 15855 | select(columnNames) { |
| 15856 | columnNames = Array.isArray(columnNames) ? columnNames : [columnNames] |
| 15857 | const result = new Particle() |
| 15858 | this.forEach(particle => { |
| 15859 | const newParticle = result.appendLine(particle.getLine()) |
| 15860 | columnNames.forEach(name => { |
| 15861 | const valueParticle = particle.getParticle(name) |
| 15862 | if (valueParticle) newParticle.appendParticle(valueParticle) |
| 15863 | }) |
| 15864 | }) |
| 15865 | return result |
| 15866 | } |
| 15867 | selectionToString() { |
| 15868 | return this.getSelectedParticles() |
| 15869 | .map(particle => particle.toString()) |
no test coverage detected