*
* @param instrCtx the current interpreter context
*/
public void interpret(final InterpreterContext instrCtx)
{
Instruction instruction = instrCtx.getCurrentInstruction();
// preconditions:
// operation's node is always DataMap
assert instruction.getOperation().getClass() == DataMap.class;
// data's node is always DataMap
assert instruction.getData().getClass() == DataMap.class;
//_usedFields variable is used to keep track of fields, which were already used
//at this nodes. The reason for it is that if field should not be used in more than
//one operation e.g. $set and $delete, because such patch becomes ambiguous.
//Each operation, upon being executed updates this variable.
final Map<String, String> usedFields = new HashMap<String, String>();
DataMap opNode = (DataMap) instruction.getOperation();
DataMap dataNode = (DataMap) instruction.getData();
/**
* Apply all supported operations here. _usedFields is used to keep track of fields
* that operations were applied to.
*/