Groovy Documentation

org.jdesktop.swingx.ws.yahoo.search
[Java] Interface ResultsList

java.lang.Iterable
  java.util.Collection
      org.jdesktop.swingx.ws.yahoo.search.ResultsList
All Superinterfaces:
Iterable, Collection

public interface ResultsList
extends List

A java.util.List containing the list of search results. This List is generally constructed by the various YahooSearch subclasses during the readResults() phase of the search. It is not thought generally useful to create instances of this class yourself.

ResultsList differs from java.util.List in that it adds two methods: getTotalResultsAvailable and getFirstResultPosition. The values returned from this method are typically based on search results.

For example, suppose a search is performed that includes 100 results but only the results between 30(inclusive)-40(exclusive) are included. The results from these methods would be:

None of these values are required for using this List. Rather, they are useful when used to page through all of the totalResultsAvailable.

This interface adds one more important method, getYahooSearch() which returns the YahooSearch that was used to produce this search ResultsList. This allows some automated code to page through all the results, creating new searches as necessary.

Authors:
rbair


Method Summary
int getFirstResultPosition()

Returns:
the 1 based index into the totalResultsAvailable that this ResultsList is populated with.

int getTotalResultsAvailable()

Returns:
the total results available, not to be confused with the total results in this ResultsList.

YahooSearch getYahooSearch()

Returns:
the YahooSearch that was used to produce this ResultsList.

 
Methods inherited from interface List
add, add, get, equals, hashCode, indexOf, clear, isEmpty, lastIndexOf, contains, addAll, addAll, size, toArray, toArray, iterator, remove, remove, set, listIterator, listIterator, subList, removeAll, containsAll, retainAll
 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Method Detail

getFirstResultPosition

public int getFirstResultPosition()
Returns:
the 1 based index into the totalResultsAvailable that this ResultsList is populated with. For example, if there are 100 total results, and this list contains results 30-40, then this method will return 30.


getTotalResultsAvailable

public int getTotalResultsAvailable()
Returns:
the total results available, not to be confused with the total results in this ResultsList. This method returns the total number of search results associated with the search that produced this ResultsList.


getYahooSearch

public YahooSearch getYahooSearch()
Returns:
the YahooSearch that was used to produce this ResultsList. May be null.


 

Groovy Documentation