-
- private static final class EmptyDataTreeCandidateNode implements DataTreeCandidateNode {
-
- private final PathArgument identifier;
-
- EmptyDataTreeCandidateNode(final PathArgument identifier) {
- this.identifier = Preconditions.checkNotNull(identifier, "Identifier should not be null");
- }
-
- @Nonnull
- @Override
- public PathArgument getIdentifier() {
- return identifier;
- }
-
- @Nonnull
- @Override
- public Collection<DataTreeCandidateNode> getChildNodes() {
- return Collections.emptySet();
- }
-
- @Nullable
- @Override
- @SuppressWarnings("checkstyle:hiddenField")
- public DataTreeCandidateNode getModifiedChild(final PathArgument identifier) {
- return null;
- }
-
- @Nonnull
- @Override
- public ModificationType getModificationType() {
- return ModificationType.UNMODIFIED;
- }
-
- @Nonnull
- @Override
- public Optional<NormalizedNode<?, ?>> getDataAfter() {
- return Optional.empty();
- }
-
- @Nonnull
- @Override
- public Optional<NormalizedNode<?, ?>> getDataBefore() {
- return Optional.empty();
- }
- }