import static java.util.Objects.requireNonNull;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
-public abstract class AbstractImmutableNormalizedValueNode<K extends PathArgument, V> extends
- AbstractImmutableNormalizedNode<K, V> {
+public abstract class AbstractImmutableNormalizedValueNode<K extends PathArgument, N extends NormalizedNode, V>
+ extends AbstractImmutableNormalizedNode<K, N> {
+ private final @NonNull V value;
- @Nonnull
- private final V value;
-
- protected AbstractImmutableNormalizedValueNode(final K nodeIdentifier, @Nonnull final V value) {
+ protected AbstractImmutableNormalizedValueNode(final K nodeIdentifier, final @NonNull V value) {
super(nodeIdentifier);
this.value = requireNonNull(value);
}
@Override
- public final V getValue() {
+ public final V body() {
return wrapValue(value);
}
- @Nonnull
- protected final V value() {
+ protected final @NonNull V value() {
return value;
}
- protected V wrapValue(final V value) {
- return value;
+ protected V wrapValue(final V valueToWrap) {
+ return valueToWrap;
}
}