}
}
public static boolean checkConditions(@Nonnull Document doc, @Nonnull UpdateOp update) {
for (Map.Entry<Key, Operation> change : update.getChanges().entrySet()) {
Operation op = change.getValue();
if (op.type == Operation.Type.CONTAINS_MAP_ENTRY) {
Key k = change.getKey();
Revision r = k.getRevision();
if (r == null) {
throw new IllegalStateException("CONTAINS_MAP_ENTRY must not contain null revision");