From 2d45de18df35f6d3ba4ca0b86ec1188e49637413 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 18 May 2008 19:29:30 +0000 Subject: The TaskManager works partly. --- sources/utils/VSPriorityQueue.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 sources/utils/VSPriorityQueue.java (limited to 'sources/utils/VSPriorityQueue.java') diff --git a/sources/utils/VSPriorityQueue.java b/sources/utils/VSPriorityQueue.java new file mode 100644 index 0000000..dd46a6e --- /dev/null +++ b/sources/utils/VSPriorityQueue.java @@ -0,0 +1,15 @@ +package utils; + +import java.util.PriorityQueue; + +public final class VSPriorityQueue extends PriorityQueue { + public T get(int index) { + int i = 0; + + for (T t : this) + if (i++ == index) + return t; + + return null; + } +} -- cgit v1.2.3