this should be algorithm.setTopology(algorithm.getTopology().map(new F<Particle, Particle>() {