|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object googlesearch.QueryStore
public class QueryStore
A storage mechanism for queries. Queries are stored with a user-supplied name. The name can be later used to retrieve a query.
Constructor Summary | |
---|---|
QueryStore()
|
Method Summary | |
---|---|
void |
clear()
Remove all the queries from the storage. |
Query |
get(java.lang.String key)
Retrieve a query with a given "name" or the NULL_QUERY if no query with the name is stored |
java.util.Iterator<java.lang.String> |
keys()
Obtain an iterator over the keys. |
void |
put(java.lang.String key,
Query query)
Insert a query into the storage tagged with a name of your choosing. |
void |
remove(java.lang.String key)
Remove a given query from the storage |
java.util.Iterator<Query> |
values()
Obtain an iterator over all the Queries in the storage |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueryStore()
Method Detail |
---|
public void put(java.lang.String key, Query query)
key
- a name of your choosing to use as the retrieval keyquery
- the query to be savedpublic Query get(java.lang.String key)
key
- the "key" used when a query was stored
public void remove(java.lang.String key)
key
- the name of the query to be removedpublic void clear()
public java.util.Iterator<java.lang.String> keys()
public java.util.Iterator<Query> values()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |