replaceAll
Makes newEntities, in that order, the shapes that exist, whatever there was before, as ONE change: whoever watches entities sees the old list and then the new one, never the many in-between lists that removing and adding one by one would show (and that would each make the map redraw). What a loaded file or a restored snapshot needs. An empty list clears the repository. Not a history step: it is a command's job to make a change that can be undone, and replacing everything is meant for the host to set the scene (clear the history with it, see HistoryManager.clear).
Throws
if two of newEntities have the same id; nothing changes then.