org.springframework.social.twitter.api
Class CursoredList<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<T>
              extended by 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

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
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
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

CursoredList

public CursoredList(Collection<? extends T> collection,
                    long previousCursor,
                    long nextCursor)

CursoredList

public CursoredList(int initialCapacity,
                    long previousCursor,
                    long nextCursor)
Method Detail

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.