Rework NormalizedNode type hierarchy
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / nodes / AbstractImmutableNormalizedValueNode.java
index 2e6b6b1991378e35001fd286e038188b5d168087..ee0acab5b92e4efba060c7fb6736316de58d2f0d 100644 (file)
@@ -9,27 +9,25 @@ package org.opendaylight.yangtools.yang.data.impl.schema.nodes;
 
 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;
     }