org.apache.lucene.search
Class WildcardTermEnum
public class WildcardTermEnum
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.
$Id: WildcardTermEnum.java 329859 2005-10-31 17:05:36Z bmesser $
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.
|
WILDCARD_CHAR
public static final char WILDCARD_CHAR
WILDCARD_STRING
public static final char WILDCARD_STRING
String equality with support for wildcards
WildcardTermEnum
public WildcardTermEnum(IndexReader reader,
Term term)
throws IOException
Creates a new
WildcardTermEnum
. Passing in a
Term
that does not contain a
WILDCARD_CHAR
will cause an exception to be thrown.
After calling the constructor the enumeration is already pointing to the first
valid term if such a term exists.
close
public void close()
throws IOException
Closes the enumeration to further activity, freeing resources.
- close in interface FilteredTermEnum
endEnum
public final boolean endEnum()
Indiciates the end of the enumeration has been reached
- endEnum in interface 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.
Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.