2 * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others. All rights reserved.
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
8 package org.opendaylight.yangtools.yang.data.codec.binfmt;
10 import java.util.Collection;
11 import java.util.Optional;
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
13 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
14 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode;
15 import org.opendaylight.yangtools.yang.data.api.schema.tree.ModificationType;
17 final class UnmodifiedRootDataTreeCandidateNode extends AbstractDataTreeCandidateNode {
18 static final UnmodifiedRootDataTreeCandidateNode INSTANCE = new UnmodifiedRootDataTreeCandidateNode();
20 private UnmodifiedRootDataTreeCandidateNode() {
21 super(ModificationType.UNMODIFIED);
25 public PathArgument getIdentifier() {
26 throw new UnsupportedOperationException("Root node does not have an identifier");
30 public Optional<NormalizedNode> getDataAfter() {
31 throw new UnsupportedOperationException("After-image not available after serialization");
35 public Collection<DataTreeCandidateNode> getChildNodes() {
36 throw new UnsupportedOperationException("Children not available after serialization");