Mailing List Archive

cvs commit: jakarta-lucene-sandbox/contributions/webcrawler-LARM/src/de/lanlab/larm/util CachingQueue.java
cmarschner 2002/10/22 08:35:20

Modified: contributions/webcrawler-LARM/src/de/lanlab/larm/util
CachingQueue.java
Log:
added isEmpty and clear methods

Revision Changes Path
1.5 +15 -3 jakarta-lucene-sandbox/contributions/webcrawler-LARM/src/de/lanlab/larm/util/CachingQueue.java

Index: CachingQueue.java
===================================================================
RCS file: /home/cvs/jakarta-lucene-sandbox/contributions/webcrawler-LARM/src/de/lanlab/larm/util/CachingQueue.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- CachingQueue.java 15 Sep 2002 20:21:18 -0000 1.4
+++ CachingQueue.java 22 Oct 2002 15:35:20 -0000 1.5
@@ -491,6 +491,18 @@
return size;
}

+ public boolean isEmpty()
+ {
+ return size == 0;
+ }
+
+ public void clear()
+ {
+ while(!isEmpty())
+ {
+ remove();
+ }
+ }

/**
* testing
@@ -520,7 +532,7 @@
}

/**
- * 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 @@
{
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));




--
To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>