code: private void setup(Collection<T> items, int ps, Comparator<T> sort) {
  		Collection<T> list;
  		Iterator<T> it;
  
  		if( sort == null ) {
  			list = items;
  		}
  		else {
  			list = new TreeSet<T>(sort);
  			list.addAll(items);			
  		}
  		sorter = sort;
  		pageSize = ps;
          pages = new ArrayList<Collection<T>>();
  		it = list.iterator();		
  		while( it.hasNext() ) {
  			ArrayList<T> page = new ArrayList<T>();
  			
  			pages.add(page);
  			for(int i=0; i<ps; i++ ) {
                  T ob;
                  
  				if( !it.hasNext() ) {
  					break;
  				}
                  ob = it.next();
  				page.add(ob);
  			}
  		}
  	}
docs: Sets the collection up using the specified parameters.
  @param items the items in the iterator
  @param ps the page size for the structure
  @param sort the sorter, if any, to use for sorting