return false;
}
public static boolean containsMutation(DocOp docOp) {
for (int i = 0; i < docOp.getComponents().size(); i++) {
DocOpComponent component = docOp.getComponents().get(i);
switch (component.getType()) {
case DocOpComponent.Type.DELETE:
case DocOpComponent.Type.INSERT:
return true;
case DocOpComponent.Type.RETAIN:
case DocOpComponent.Type.RETAIN_LINE:
// Retains do not dirty the contents of a file
break;
default:
throw new IllegalArgumentException("Got an unknown doc op type " + component.getType());
}
}
return false;
}