Package gov.usgs.earthquake.indexer
Class SearchResponse
- java.lang.Object
-
- gov.usgs.earthquake.indexer.SearchResponse
-
public class SearchResponse extends java.lang.Object
Results from a SearchRequest.
-
-
Constructor Summary
Constructors Constructor Description SearchResponse()
Construct a new Search response.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addResult(SearchQuery result)
Add a search result to this response.boolean
equals(java.lang.Object obj)
Test by comparing each result.java.util.List<Event>
getEvents()
Get a distinct list of events from EventDetailQuery results.java.util.List<SearchQuery>
getResults()
int
hashCode()
Also override hashCode, using hash of result objects.
-
-
-
Method Detail
-
addResult
public void addResult(SearchQuery result)
Add a search result to this response.- Parameters:
result
- a searchQuery result
-
getResults
public java.util.List<SearchQuery> getResults()
- Returns:
- The search results.
-
equals
public boolean equals(java.lang.Object obj)
Test by comparing each result.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
Also override hashCode, using hash of result objects.- Overrides:
hashCode
in classjava.lang.Object
-
getEvents
public java.util.List<Event> getEvents()
Get a distinct list of events from EventDetailQuery results.- Returns:
- List of found events. List will be empty if there were no EventDetailQueries, or no matching events were found.
-
-