BUG-7464: Eliminate custom Map.Entry implementation
[yangtools.git] / third-party / triemap / src / main / java / org / opendaylight / yangtools / triemap / ListMap.java
index fd3da93de745fcadc158d3c7e8df1c511acddda9..21d7b8469258d57ecee7513a69a266ded0378016 100644 (file)
@@ -1,6 +1,7 @@
 package org.opendaylight.yangtools.triemap;
 
 import java.util.Iterator;
+import java.util.AbstractMap.SimpleImmutableEntry;
 import java.util.Map;
 import java.util.Map.Entry;
 
@@ -210,7 +211,7 @@ abstract class ListMap<K,V> {
             public Entry<K, V> next () {
                 if (n instanceof Node) {
                     Node<K, V> nn = (Node<K, V>) n;
-                    Pair<K, V> res = new Pair<K, V> (nn.k, nn.v);
+                    Entry<K, V> res = new SimpleImmutableEntry<K, V> (nn.k, nn.v);
                     n = n.next;
                     return res;
                 } else {