lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/analysis StopFilter.java
Date Wed, 10 Mar 2004 23:17:38 GMT
ehatcher    2004/03/10 15:17:38

  Modified:    src/java/org/apache/lucene/analysis StopFilter.java
  Log:
  Caved in.... HashSet all the way around it is
  
  Revision  Changes    Path
  1.9       +6 -7      jakarta-lucene/src/java/org/apache/lucene/analysis/StopFilter.java
  
  Index: StopFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/analysis/StopFilter.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- StopFilter.java	10 Mar 2004 09:59:57 -0000	1.8
  +++ StopFilter.java	10 Mar 2004 23:17:37 -0000	1.9
  @@ -57,7 +57,6 @@
   import java.io.IOException;
   import java.util.HashSet;
   import java.util.Hashtable;
  -import java.util.Set;
   
   /**
    * Removes stop words from a token stream.
  @@ -65,7 +64,7 @@
   
   public final class StopFilter extends TokenFilter {
   
  -  private Set stopWords;
  +  private HashSet stopWords;
   
     /**
      * Constructs a filter which removes words from the input
  @@ -80,7 +79,7 @@
      * Constructs a filter which removes words from the input
      * TokenStream that are named in the Hashtable.
      *
  -   * @deprecated Use {@link #StopFilter(TokenStream, Set)} StopFilter(TokenStream,Map)}
instead
  +   * @deprecated Use {@link #StopFilter(TokenStream, HashSet)} StopFilter(TokenStream,Map)}
instead
      */
     public StopFilter(TokenStream in, Hashtable stopTable) {
       super(in);
  @@ -91,9 +90,9 @@
      * Constructs a filter which removes words from the input
      * TokenStream that are named in the Set.
      */
  -  public StopFilter(TokenStream in, Set stopWords) {
  +  public StopFilter(TokenStream in, HashSet stopWords) {
       super(in);
  -    this.stopWords = new HashSet(stopWords);
  +    this.stopWords = stopWords;
     }
   
     /**
  @@ -117,8 +116,8 @@
      * This permits this stopWords construction to be cached once when
      * an Analyzer is constructed.
      */
  -  public static final Set makeStopSet(String[] stopWords) {
  -    Set stopTable = new HashSet(stopWords.length);
  +  public static final HashSet makeStopSet(String[] stopWords) {
  +    HashSet stopTable = new HashSet(stopWords.length);
       for (int i = 0; i < stopWords.length; i++)
         stopTable.add(stopWords[i]);
       return stopTable;
  
  
  

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


Mime
View raw message