org.apache.lucene.search
Class WildcardTermEnum
java.lang.Object
|
+--org.apache.lucene.index.TermEnum
|
+--org.apache.lucene.search.FilteredTermEnum
|
+--org.apache.lucene.search.WildcardTermEnum
- public class WildcardTermEnum
- extends FilteredTermEnum
Subclass of FilteredTermEnum for enumerating all terms that match the
specified wildcard filter term.
Term enumerations are always ordered by Term.compareTo(). Each term in
the enumeration is greater than all that precede it.
Method Summary |
void |
close()
Closes the enumeration to further activity, freeing resources. |
float |
difference()
Equality measure on the term |
boolean |
endEnum()
Indiciates the end of the enumeration has been reached |
protected boolean |
termCompare(Term term)
Equality compare on the term |
static boolean |
wildcardEquals(String pattern,
int patternIdx,
String string,
int stringIdx)
Determines if a word matches a wildcard pattern. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WILDCARD_STRING
public static final char WILDCARD_STRING
- String equality with support for wildcards
WILDCARD_CHAR
public static final char WILDCARD_CHAR
WildcardTermEnum
public WildcardTermEnum(IndexReader reader,
Term term)
throws IOException
- Creates new WildcardTermEnum
termCompare
protected final boolean termCompare(Term term)
- Description copied from class:
FilteredTermEnum
- Equality compare on the term
- Overrides:
termCompare
in class FilteredTermEnum
difference
public final float difference()
- Description copied from class:
FilteredTermEnum
- Equality measure on the term
- Overrides:
difference
in class FilteredTermEnum
endEnum
public final boolean endEnum()
- Description copied from class:
FilteredTermEnum
- Indiciates the end of the enumeration has been reached
- Overrides:
endEnum
in class FilteredTermEnum
wildcardEquals
public static final boolean wildcardEquals(String pattern,
int patternIdx,
String string,
int stringIdx)
- Determines if a word matches a wildcard pattern.
Work released by Granta Design Ltd after originally being done on
company time.
close
public void close()
throws IOException
- Description copied from class:
FilteredTermEnum
- Closes the enumeration to further activity, freeing resources.
- Overrides:
close
in class FilteredTermEnum
Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.