Do not generate 'isFoo()' methods
[mdsal.git] / dom / mdsal-dom-spi / src / main / java / org / opendaylight / mdsal / dom / spi / shard / WritableInteriorNode.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.mdsal.dom.spi.shard;
9
10 import static java.util.Objects.requireNonNull;
11
12 import java.util.Map;
13 import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteCursor;
14 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
15
16 @Deprecated(forRemoval = true)
17 class WritableInteriorNode extends WriteableNodeWithSubshard {
18
19     private final PathArgument identifier;
20
21     WritableInteriorNode(final PathArgument identifier, final Map<PathArgument, WriteableModificationNode> children) {
22         super(children);
23         this.identifier = requireNonNull(identifier);
24     }
25
26     @Override
27     public PathArgument getIdentifier() {
28         return identifier;
29     }
30
31     @Override
32     public WriteCursorStrategy createOperation(final DOMDataTreeWriteCursor parentCursor) {
33         return new WritableNodeOperation(this, parentCursor) {
34             @Override
35             public void exit() {
36                 // We are not root, so we can safely exit our level.
37                 getCursor().exit();
38             }
39         };
40     }
41
42 }