diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-18 19:29:30 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-18 19:29:30 +0000 |
| commit | 2d45de18df35f6d3ba4ca0b86ec1188e49637413 (patch) | |
| tree | 6c84c8cd14a89a6dabeada811c6477d1e5459767 /sources/utils/VSPriorityQueue.java | |
| parent | c46ed2242876bfb267ed0b6823c8a3e99ac62dd6 (diff) | |
The TaskManager works partly.
Diffstat (limited to 'sources/utils/VSPriorityQueue.java')
| -rw-r--r-- | sources/utils/VSPriorityQueue.java | 15 |
1 files changed, 15 insertions, 0 deletions
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<T> extends PriorityQueue<T> { + public T get(int index) { + int i = 0; + + for (T t : this) + if (i++ == index) + return t; + + return null; + } +} |
