com.braintreegateway
Class ResourceCollection<T>

java.lang.Object
  extended by com.braintreegateway.ResourceCollection<T>
Type Parameters:
T - type of object being paged, e.g. Transaction or Customer.
All Implemented Interfaces:
Iterable<T>

public class ResourceCollection<T>
extends Object
implements Iterable<T>

A collection used to page through query or search results.


Nested Class Summary
private  class ResourceCollection.PagedIterator<E>
           
 
Field Summary
private  List<String> ids
           
private  Pager<T> pager
           
private  int pageSize
           
 
Constructor Summary
ResourceCollection(Pager<T> pager, NodeWrapper response)
           
 
Method Summary
 T getFirst()
           
 int getMaximumSize()
          Returns the approximate total size of the collection.
 Iterator<T> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ids

private List<String> ids

pager

private Pager<T> pager

pageSize

private int pageSize
Constructor Detail

ResourceCollection

public ResourceCollection(Pager<T> pager,
                          NodeWrapper response)
Method Detail

getMaximumSize

public int getMaximumSize()
Returns the approximate total size of the collection.

Returns:
Approximate size of collection

iterator

public Iterator<T> iterator()
Specified by:
iterator in interface Iterable<T>

getFirst

public T getFirst()


Copyright © 2013. All Rights Reserved.