summaryrefslogtreecommitdiff
path: root/sources/utils/VSPriorityQueue.java
blob: dd46a6eee986d3f8ecd3b46941645ecae68f6006 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package utils;

import java.util.PriorityQueue;

public final class VSPriorityQueue<T> extends PriorityQueue<T> {
    public T get(int index) {
        int i = 0;

        for (T t : this)
            if (i++ == index)
                return t;

        return null;
    }
}