From fedb45760005ba58b28548b4396c8109a1ca9213 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Tue, 19 Mar 2002 13:19:13 +0000 Subject: [PATCH] Fixed API to use new interfaces defined by PriorityQueue. Now supports objects that do not implement comparable. git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130664 13f79535-47bb-0310-9956-ffa450edef68 --- .../collections/SynchronizedPriorityQueue.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/java/org/apache/commons/collections/SynchronizedPriorityQueue.java b/src/java/org/apache/commons/collections/SynchronizedPriorityQueue.java index c9520c38d..eaadcaeb2 100644 --- a/src/java/org/apache/commons/collections/SynchronizedPriorityQueue.java +++ b/src/java/org/apache/commons/collections/SynchronizedPriorityQueue.java @@ -1,7 +1,7 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/SynchronizedPriorityQueue.java,v 1.2 2002/02/10 08:07:42 jstrachan Exp $ - * $Revision: 1.2 $ - * $Date: 2002/02/10 08:07:42 $ + * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/SynchronizedPriorityQueue.java,v 1.3 2002/03/19 13:19:13 mas Exp $ + * $Revision: 1.3 $ + * $Date: 2002/03/19 13:19:13 $ * * ==================================================================== * @@ -102,7 +102,7 @@ public final class SynchronizedPriorityQueue * * @param element the element to be inserted */ - public synchronized void insert( final Comparable element ) + public synchronized void insert( final Object element ) { m_priorityQueue.insert( element ); } @@ -113,7 +113,7 @@ public final class SynchronizedPriorityQueue * @return the element at top of heap * @exception NoSuchElementException if isEmpty() == true */ - public synchronized Comparable peek() throws NoSuchElementException + public synchronized Object peek() throws NoSuchElementException { return m_priorityQueue.peek(); } @@ -124,7 +124,7 @@ public final class SynchronizedPriorityQueue * @return the element at top of heap * @exception NoSuchElementException if isEmpty() == true */ - public synchronized Comparable pop() throws NoSuchElementException + public synchronized Object pop() throws NoSuchElementException { return m_priorityQueue.pop(); }