BUG-7464: Refactor KVNode
[yangtools.git] / third-party / triemap / src / main / java / org / opendaylight / yangtools / triemap / EntryNode.java
similarity index 61%
rename from third-party/triemap/src/main/java/org/opendaylight/yangtools/triemap/KVNode.java
rename to third-party/triemap/src/main/java/org/opendaylight/yangtools/triemap/EntryNode.java
index ac260fa01037b6131f4b07b36e9cf842027eada4..d50b7d473842c37da4290f7d296b922ed8f3756c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2016 Pantheon Technologies, s.r.o. and others.
+ * (C) Copyright 2017 Pantheon Technologies, s.r.o. and others.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,6 +17,17 @@ package org.opendaylight.yangtools.triemap;
 
 import java.util.Map.Entry;
 
-interface KVNode<K, V> {
-    Entry<K, V> kvPair();
+/**
+ * Common marker interface for nodes which act as an immutable {@link Entry}.
+ *
+ * @author Robert Varga
+ *
+ * @param <K> the type of key
+ * @param <V> the type of value
+ */
+interface EntryNode<K, V> extends Entry<K, V> {
+    @Override
+    default public V setValue(final V value) {
+        throw new UnsupportedOperationException();
+    }
 }