lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r803681 - in /lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans: NearSpansOrdered.java NearSpansUnordered.java Spans.java TermSpans.java
Date Wed, 12 Aug 2009 19:42:34 GMT
Author: markrmiller
Date: Wed Aug 12 19:42:33 2009
New Revision: 803681

URL: http://svn.apache.org/viewvc?rev=803681&view=rev
Log:
fixes for LUCENE-1748: make Spans an abstract class

Modified:
    lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/NearSpansOrdered.java
    lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/NearSpansUnordered.java
    lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/Spans.java
    lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/TermSpans.java

Modified: lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/NearSpansOrdered.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/NearSpansOrdered.java?rev=803681&r1=803680&r2=803681&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/NearSpansOrdered.java
(original)
+++ lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/NearSpansOrdered.java
Wed Aug 12 19:42:33 2009
@@ -47,7 +47,7 @@
  * <pre>t1 t2 .. t3      </pre>
  * <pre>      t1 .. t2 t3</pre>
  */
-class NearSpansOrdered implements Spans {
+class NearSpansOrdered extends Spans {
   private final int allowedSlop;
   private boolean firstTime = true;
   private boolean more = false;

Modified: lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/NearSpansUnordered.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/NearSpansUnordered.java?rev=803681&r1=803680&r2=803681&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/NearSpansUnordered.java
(original)
+++ lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/NearSpansUnordered.java
Wed Aug 12 19:42:33 2009
@@ -27,7 +27,7 @@
 import java.util.Set;
 import java.util.HashSet;
 
-class NearSpansUnordered implements Spans {
+class NearSpansUnordered extends Spans {
   private SpanNearQuery query;
 
   private List ordered = new ArrayList();         // spans in query order
@@ -62,7 +62,7 @@
 
 
   /** Wraps a Spans, and can be used to form a linked list. */
-  private class SpansCell implements Spans {
+  private class SpansCell extends Spans {
     private Spans spans;
     private SpansCell next;
     private int length = -1;

Modified: lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/Spans.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/Spans.java?rev=803681&r1=803680&r2=803681&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/Spans.java
(original)
+++ lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/Spans.java
Wed Aug 12 19:42:33 2009
@@ -24,9 +24,9 @@
  * Each span represents a range of term positions within a document.  Matches
  * are enumerated in order, by increasing document number, within that by
  * increasing start position and finally by increasing end position. */
-public interface Spans {
+public abstract class Spans {
   /** Move to the next match, returning true iff any such exists. */
-  boolean next() throws IOException;
+  public abstract boolean next() throws IOException;
 
   /** Skips to the first match beyond the current, whose document number is
    * greater than or equal to <i>target</i>. <p>Returns true iff there
is such
@@ -41,16 +41,16 @@
    * </pre>
    * Most implementations are considerably more efficient than that.
    */
-  boolean skipTo(int target) throws IOException;
+  public abstract boolean skipTo(int target) throws IOException;
 
   /** Returns the document number of the current match.  Initially invalid. */
-  int doc();
+  public abstract int doc();
 
   /** Returns the start position of the current match.  Initially invalid. */
-  int start();
+  public abstract int start();
 
   /** Returns the end position of the current match.  Initially invalid. */
-  int end();
+  public abstract int end();
   
   /**
    * Returns the payload data for the current span.
@@ -75,7 +75,7 @@
    * @throws java.io.IOException
     */
   // TODO: Remove warning after API has been finalized
-  Collection/*<byte[]>*/ getPayload() throws IOException;
+  public abstract Collection/*<byte[]>*/ getPayload() throws IOException;
 
   /**
    * Checks if a payload can be loaded at this position.
@@ -91,6 +91,6 @@
    * @return true if there is a payload available at this position that can be loaded
    */
   // TODO: Remove warning after API has been finalized
-  public boolean isPayloadAvailable();
+  public abstract boolean isPayloadAvailable();
 
 }

Modified: lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/TermSpans.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/TermSpans.java?rev=803681&r1=803680&r2=803681&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/TermSpans.java
(original)
+++ lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/search/spans/TermSpans.java
Wed Aug 12 19:42:33 2009
@@ -27,7 +27,7 @@
  * Expert:
  * Public for extension only
  */
-public class TermSpans implements Spans {
+public class TermSpans extends Spans {
   protected TermPositions positions;
   protected Term term;
   protected int doc;



Mime
View raw message