lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <...@teamware.com>
Subject Re: ScoreDocComparator extends Comparator?
Date Fri, 23 Mar 2007 03:02:19 GMT
Oops.  Java 1.5 PriorityQueue.remove(o) would not be useful for ScoreDoc as it 
would delete the first object where compare(o1, o2) == 0.

Antony

> Should ScoreDocComparator extend java.util.Comparator.  The existing 
> compare() method has the Javadoc comment @see java.util.Comparator.
> 
> It would then be useful with Java 1.5's PriorityQueue and that would be 
> good because PriorityQueue has a remove() method which makes it useful 
> for manipulating the queue.



---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message