r26591 - trunk/freenet/src/freenet/support

[email protected]
Newsgroups gmane.network.freenet.cvs
Message-ID <[email protected]>
Author: j16sdiz
Date: 2009-04-07 05:13:41 +0000 (Tue, 07 Apr 2009)
New Revision: 26591

Modified:
   trunk/freenet/src/freenet/support/TimeSortedHashtable.java
Log:
Revert 26586: this is java6 only

Modified: trunk/freenet/src/freenet/support/TimeSortedHashtable.java
===================================================================
--- trunk/freenet/src/freenet/support/TimeSortedHashtable.java	2009-04-07 05:05:41 UTC (rev 26590)
+++ trunk/freenet/src/freenet/support/TimeSortedHashtable.java	2009-04-07 05:13:41 UTC (rev 26591)
@@ -9,7 +9,7 @@
 /**
  * Variant on LRUHashtable which provides an efficient how-many-since-time-T operation.
  */
-public class TimeSortedHashtable<T extends Comparable<?>> implements Cloneable {
+public class TimeSortedHashtable<T extends Comparable> implements Cloneable {
 	public TimeSortedHashtable() {
 		this.elements = new TreeSet<Comparable>(new MyComparator());
 		this.valueToElement = new HashMap<T, Element<T>>();
@@ -152,7 +152,7 @@
      * @return The set of times after the given time.
      */
     public final synchronized Long[] timesAfter(long t) {
-    	Set<Comparable> s = elements.tailSet(t, false);
+    	Set<Comparable> s = elements.tailSet(t);
     	
     	Long[] times = new Long[s.size()];
     	int x = 0;
@@ -168,7 +168,7 @@
      */
 	// FIXME this is broken if timestamp != -1
     public final synchronized <E extends Comparable> E[] valuesAfter(long t, E[] values) {
-    	Set<Comparable> s = elements.tailSet(t, false);
+    	Set<Comparable> s = elements.tailSet(t);
     	
     	int x = 0;
     	for(Iterator<Comparable> i = s.iterator();i.hasNext();) {
@@ -179,7 +179,7 @@
     }
 
 	public synchronized int countValuesAfter(long t) {
-    	Set<Comparable> s = elements.tailSet(t, false);
+    	Set<Comparable> s = elements.tailSet(t);
     	
     	return s.size();
 	}
@@ -189,7 +189,7 @@
      */
 	public final synchronized void removeBefore(long t) {
     	assert(elements.size() == valueToElement.size());
-    	Set<Comparable> s = elements.headSet(t, false);
+    	Set<Comparable> s = elements.headSet(t);
     	
     	for(Iterator<Comparable> i = s.iterator();i.hasNext();) {
     		Element<T> e = (Element<T>) i.next();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.