Apache Lucene open-source search software
added isEmpty and clear methods
cmarschnera01f445199c8
diff --git a/sandbox/contributions/webcrawler-LARM/src/de/lanlab/larm/util/CachingQueue.java b/sandbox/contributions/webcrawler-LARM/src/de/lanlab/larm/util/CachingQueue.javaindex 95f173fc626..4687f948677 100644--- a/sandbox/contributions/webcrawler-LARM/src/de/lanlab/larm/util/CachingQueue.java+++ b/sandbox/contributions/webcrawler-LARM/src/de/lanlab/larm/util/CachingQueue.java@@ -491,6 +491,18 @@ public class CachingQueue implements Queuereturn size;}+ public boolean isEmpty()+ {+ return size == 0;+ }++ public void clear()+ {+ while(!isEmpty())+ {+ remove();+ }+ }/*** testing@@ -520,7 +532,7 @@ class AssertionFailedException extends RuntimeException}/**- * Testklasse. Enth�lt einige Tests f�r die Funktionalit�t der CachingQueue+ * Testklasse. contains some tests for the caching queue** @author Administrator* @created 3. Januar 2002@@ -727,11 +739,11 @@ class CachingQueueTester{if (!(new File("testQueue5_1.cqb").delete())){- System.err.println("CachingQueueTester.textExceptions: Store 1 nicht vorhanden. Filename ge�ndert?");+ System.err.println("CachingQueueTester.textExceptions: Store 1 deleted. file name changed?");}if (!(new File("testQueue5_2.cqb").delete())){- System.err.println("CachingQueueTester.textExceptions: Store 2 nicht vorhanden. Filename ge�ndert?");+ System.err.println("CachingQueueTester.textExceptions: Store 2 deleted. file name changed?");}String t = (String) cq.remove();affirm(t.equals(test1));diff --git a/sandbox/contributions/webcrawler-LARM/src/de/lanlab/larm/util/Queue.java b/sandbox/contributions/webcrawler-LARM/src/de/lanlab/larm/util/Queue.javaindex 3e7ee8f9199..7236eab4f0e 100644--- a/sandbox/contributions/webcrawler-LARM/src/de/lanlab/larm/util/Queue.java+++ b/sandbox/contributions/webcrawler-LARM/src/de/lanlab/larm/util/Queue.java@@ -71,4 +71,6 @@ public interface Queuepublic void insert(Object o);public void insertMultiple(Collection c);public int size();+ public boolean isEmpty();+ public void clear();}\ No newline at end of file