Package ca.cgjennings.algo
Class TextIndex.Atom
- java.lang.Object
-
- ca.cgjennings.algo.TextIndex.Query
-
- ca.cgjennings.algo.TextIndex.Atom
-
- Enclosing class:
- TextIndex
public static class TextIndex.Atom extends TextIndex.Query
An atom is a query that matches all documents that contain a specified one-word search term.
-
-
Constructor Summary
Constructors Constructor Description Atom(java.lang.String term)Creates an atom that matchesterm.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextIndex.Resultexecute(TextIndex ti)Returns theResultof performing this query against a specific text index.TextIndex.ResultexecuteInverse(TextIndex ti)Returns the inverse of the set of documents containing the search term.java.lang.StringtoString()-
Methods inherited from class ca.cgjennings.algo.TextIndex.Query
evaluate
-
-
-
-
Method Detail
-
execute
public TextIndex.Result execute(TextIndex ti)
Description copied from class:TextIndex.QueryReturns theResultof performing this query against a specific text index.- Specified by:
executein classTextIndex.Query- Parameters:
ti- the text index to query- Returns:
- a result that captures the set of matching documents
- See Also:
TextIndex.Query.evaluate(ca.cgjennings.algo.TextIndex)
-
executeInverse
public TextIndex.Result executeInverse(TextIndex ti)
Returns the inverse of the set of documents containing the search term. This is equivalent tonew Not( this ).execute( ti ).- Parameters:
ti- the text index to match against- Returns:
- a result representing the documents that do not contain the search term
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-