org.springframework.social.twitter.api
Class CursoredList<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<T>
org.springframework.social.twitter.api.CursoredList<T>
- Type Parameters:
T
- the list element type
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable<T>, Collection<T>, List<T>, RandomAccess
public class CursoredList<T>
- extends ArrayList<T>
List that includes previous and next cursors for paging through items returned from Twitter in cursored pages.
- See Also:
- Serialized Form
Constructor Summary |
CursoredList(Collection<? extends T> collection,
long previousCursor,
long nextCursor)
|
CursoredList(int initialCapacity,
long previousCursor,
long nextCursor)
|
Method Summary |
long |
getNextCursor()
The cursor to retrieve the next page of results. |
long |
getPreviousCursor()
The cursor to retrieve the previous page of results. |
boolean |
hasNext()
Returns true if there is a next page of results. |
boolean |
hasPrevious()
Returns true if there is a previous page of results. |
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 |
CursoredList
public CursoredList(Collection<? extends T> collection,
long previousCursor,
long nextCursor)
CursoredList
public CursoredList(int initialCapacity,
long previousCursor,
long nextCursor)
getPreviousCursor
public long getPreviousCursor()
- The cursor to retrieve the previous page of results.
getNextCursor
public long getNextCursor()
- The cursor to retrieve the next page of results.
hasPrevious
public boolean hasPrevious()
- Returns true if there is a previous page of results.
hasNext
public boolean hasNext()
- Returns true if there is a next page of results.