2 * Copyright (c) 2023 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.api.schema.stream;
10 import static java.util.Objects.requireNonNull;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.eclipse.jdt.annotation.Nullable;
14 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedMetadata;
15 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedMountpoints;
16 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
17 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedTuple;
20 * The result of a {@link NormalizedNodeStreamWriter} stream, i.e. of a normalization operation. It really is just an
21 * implementation of {@link NormalizedTuple}.
23 public record NormalizationResult<T extends NormalizedNode>(
25 @Nullable NormalizedMetadata metadata,
26 @Nullable NormalizedMountpoints mountPoints) implements NormalizedTuple<T> {
27 public NormalizationResult {
31 public NormalizationResult(final @NonNull T data) {
32 this(data, null, null);
35 public NormalizationResult(final @NonNull T data, final @Nullable NormalizedMetadata metadata) {
36 this(data, metadata, null);
39 public NormalizationResult(final @NonNull T data, final @Nullable NormalizedMountpoints mountPoints) {
40 this(data, null, mountPoints);