package com.xqbase.java;

public class SortedListPriorityQueue<K, V> implements PriorityQueue<K, V>{

    @Override
    public int size() {
        return 0;
    }

    @Override
    public boolean isEmpty() {
        return false;
    }

    @Override
    public Entry<K, V> min() {
        return null;
    }

    @Override
    public Entry<K, V> insert(K key, V value) {
        return null;
    }

    @Override
    public Entry<K, V> removeMin() {
        return null;
    }
}

@@ -23,82 +23,568 @@
 a;%0A%0A
-public class SortedListPriorityQueue%3CK, V%3E implements PriorityQueue%3CK, V%3E%7B
+import com.xqbase.java.list.NodePositionList;%0Aimport com.xqbase.java.list.PositionList;%0A%0Aimport java.util.Comparator;%0A%0Apublic class SortedListPriorityQueue%3CK, V%3E implements PriorityQueue%3CK, V%3E%7B%0A%0A    private PositionList%3CEntry%3CK, V%3E%3E entries;%0A    private Comparator%3CK%3E c;%0A%0A    public SortedListPriorityQueue() %7B%0A        entries = new NodePositionList%3CEntry%3CK, V%3E%3E();%0A        c = new DefaultComparator%3CK%3E();%0A    %7D%0A%0A    public SortedListPriorityQueue(Comparator%3CK%3E comparator) %7B%0A        entries = new NodePositionList%3CEntry%3CK, V%3E%3E();%0A        c = comparator;%0A    %7D
 %0A%0A  
@@ -638,9 +638,22 @@
 urn 
-0
+entries.size()
 ;%0A  
@@ -721,13 +721,25 @@
 urn 
-false
+entries.isEmpty()
 ;%0A  
@@ -792,35 +792,104 @@
 ) %7B%0A        
-return null
+if (isEmpty())%0A            return null;%0A        return entries.first().element()
 ;%0A    %7D%0A%0A   
@@ -1052,11 +1052,415 @@
 l;%0A    %7D
+%0A%0A    protected static class MyEntry%3CK, V%3E implements Entry%3CK, V%3E %7B%0A%0A        protected K key;%0A        protected V value;%0A%0A        public MyEntry(K key, V value) %7B%0A            this.key = key;%0A            this.value = value;%0A        %7D%0A%0A        @Override%0A        public K getKey() %7B%0A            return key;%0A        %7D%0A%0A        @Override%0A        public V getValue() %7B%0A            return value;%0A        %7D%0A    %7D
 %0A%7D%0A

add a SortedListPriorityQueue....