org.jdesktop.swingx.ws.yahoo.search
Class ResultsArrayList<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
org.jdesktop.swingx.ws.yahoo.search.ResultsArrayList<E>
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess, ResultsList<E>
public class ResultsArrayList<E>
- extends ArrayList<E>
- implements ResultsList<E>
A basic implementation of ResultsList based on ArrayList. This object contains
a constructor in which the totalResultsAvailable, firstResultPosition,
and YahooSearch must be specified. These are immutable properties.
- See Also:
- Serialized Form
|
Constructor Summary |
ResultsArrayList(YahooSearch search,
int totalResultsAvailable,
int firstResultPosition)
Creates a new instance of ResultsArrayList |
| Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
| Methods inherited from interface java.util.List |
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray |
ResultsArrayList
public ResultsArrayList(YahooSearch search,
int totalResultsAvailable,
int firstResultPosition)
- Creates a new instance of ResultsArrayList
getTotalResultsAvailable
public int getTotalResultsAvailable()
- Specified by:
getTotalResultsAvailable in interface ResultsList<E>
- 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.
getFirstResultPosition
public int getFirstResultPosition()
- Specified by:
getFirstResultPosition in interface ResultsList<E>
- 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.
getYahooSearch
public YahooSearch getYahooSearch()
- Specified by:
getYahooSearch in interface ResultsList<E>
- Returns:
- the
YahooSearch that was used to produce this ResultsList. May
be null.