@Override public void merge(final PathArgument child, final NormalizedNode<?, ?> data) { delegate.merge(child, data); }
private static void applyNode(final DataTreeModificationCursor cursor, final ModifiedNode node) { switch (node.getOperation()) { case NONE: break; case DELETE: cursor.delete(node.getIdentifier()); break; case MERGE: cursor.merge(node.getIdentifier(), node.getWrittenValue()); applyChildren(cursor, node); break; case TOUCH: // TODO: we could improve efficiency of cursor use if we could understand // nested TOUCH operations. One way of achieving that would be a proxy // cursor, which would keep track of consecutive enter and exit calls // and coalesce them. applyChildren(cursor, node); break; case WRITE: cursor.write(node.getIdentifier(), node.getWrittenValue()); applyChildren(cursor, node); break; default: throw new IllegalArgumentException("Unhandled node operation " + node.getOperation()); } }
private static void applyNode(final DataTreeModificationCursor cursor, final ModifiedNode node) { switch (node.getOperation()) { case NONE: break; case DELETE: cursor.delete(node.getIdentifier()); break; case MERGE: cursor.merge(node.getIdentifier(), node.getWrittenValue()); applyChildren(cursor, node); break; case TOUCH: // TODO: we could improve efficiency of cursor use if we could understand // nested TOUCH operations. One way of achieving that would be a proxy // cursor, which would keep track of consecutive enter and exit calls // and coalesce them. applyChildren(cursor, node); break; case WRITE: cursor.write(node.getIdentifier(), node.getWrittenValue()); applyChildren(cursor, node); break; default: throw new IllegalArgumentException("Unhandled node operation " + node.getOperation()); } }