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.Result
execute(TextIndex ti)
Returns theResult
of performing this query against a specific text index.TextIndex.Result
executeInverse(TextIndex ti)
Returns the inverse of the set of documents containing the search term.java.lang.String
toString()
-
Methods inherited from class ca.cgjennings.algo.TextIndex.Query
evaluate
-
-
-
-
Method Detail
-
execute
public TextIndex.Result execute(TextIndex ti)
Description copied from class:TextIndex.Query
Returns theResult
of performing this query against a specific text index.- Specified by:
execute
in 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:
toString
in classjava.lang.Object
-
-