Always use lazy leaf nodes
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / nodes / AbstractImmutableNormalizedValueNode.java
index 31f8bab90dcd668012ee1a980e0c114397491ac8..13c31eca1eaff5a313be2a28b2cf005ea5432248 100644 (file)
@@ -9,16 +9,15 @@ 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;
 
 public abstract class AbstractImmutableNormalizedValueNode<K extends PathArgument, V> extends
         AbstractImmutableNormalizedNode<K, V> {
 
-    @Nonnull
-    private final V value;
+    private final @NonNull 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);
     }
@@ -28,12 +27,11 @@ public abstract class AbstractImmutableNormalizedValueNode<K extends PathArgumen
         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;
     }
 }