|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object googlesearch.ResultPageStore
public class ResultPageStore
A storage mechanism for the result pages returned by queries. Allows you to save some of the results for later without running the search again. This is a multi-map. For one key (a Query) you can save several results.
Constructor Summary | |
---|---|
ResultPageStore()
|
Method Summary | |
---|---|
void |
clear()
|
java.util.List<SearchResultPage> |
get(Query key)
Retrieve a List of the pages stored associated with this Query |
java.util.Iterator<Query> |
keys()
Obtain an iterator over the keys used in the storage |
void |
put(Query key,
java.util.Collection pages)
Put all of the pages into the storage with the given key |
void |
put(Query key,
SearchResultPage page)
Insert a page into storage with a query as key. |
void |
remove(Query key)
Remove all the pages with a given key |
void |
remove(Query key,
SearchResultPage page)
Remove a single page from the storage by key. |
java.util.Iterator<java.util.List<SearchResultPage>> |
values()
Obtain an iterator over the values stored. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResultPageStore()
Method Detail |
---|
public void put(Query key, SearchResultPage page)
key
- a query used to tag the saved pagepage
- a page to savepublic void put(Query key, java.util.Collection pages)
key
- the retrieval key used to get the pages backpages
- the pages to store with this keypublic void remove(Query key, SearchResultPage page)
key
- the key used to store the pagepage
- the page to be removed.public void remove(Query key)
key
- the key whose pages should be removed.public void clear()
public java.util.List<SearchResultPage> get(Query key)
key
- the Query whose pages were previously stored
public java.util.Iterator<Query> keys()
public java.util.Iterator<java.util.List<SearchResultPage>> values()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |