collaboratorStates.iterate(
new IterationCallback<CollaboratorCursorController.CollaboratorState>() {
@Override
public void onIteration(String userId, CollaboratorState state) {
FilePositionImpl basePosition = FilePositionImpl.make().setColumn(
state.anchor.getColumn()).setLineNumber(state.anchor.getLineNumber());
FilePositionImpl cursorPosition = FilePositionImpl.make().setColumn(
state.anchor.getColumn()).setLineNumber(state.anchor.getLineNumber());
DocumentSelectionImpl selection = DocumentSelectionImpl.make()
.setBasePosition(basePosition).setCursorPosition(cursorPosition).setUserId(userId);
map.put(userId, selection);