- All Known Implementing Classes:
CategoryQuery
,DuplicatesQuery
,StaticNodesQuery
,TextQuery
,YearQuery
public interface Query
An Interface that specifies what a query must implement, so it can be shown
-
Method Summary
Modifier and TypeMethodDescriptiongetIndex
(int index) This method returns theSortableDefaultMutableTreeNode
node for the indicated position in the query.int
The query must be able to say how many results it will return.getTitle()
Returns a title for the search that can be used to display the search results under.void
refresh()
Forces the results to be refreshedtoString()
returns the title for the search that can be used to display the search results under.
-
Method Details
-
getNumberOfResults
int getNumberOfResults()The query must be able to say how many results it will return.- Returns:
- the number of results
-
getIndex
This method returns theSortableDefaultMutableTreeNode
node for the indicated position in the query. If the index is out of bounds it returns null. The valid range is from 0 togetNumberOfResults()
.- Parameters:
index
- The component index that is to be returned 0 togetNumberOfResults()
.- Returns:
- the node for the index
-
getTitle
String getTitle()Returns a title for the search that can be used to display the search results under.- Returns:
- a string for the title
-
toString
String toString()returns the title for the search that can be used to display the search results under. -
refresh
void refresh()Forces the results to be refreshed
-