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
161722
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);
			}
		}
	}
283375
public void setItems(java.util.Collection<java.util.Map<String,AttributeValue>> items) {
        if (items == null) {
            this.items = null;
            return;
        }

        java.util.List<java.util.Map<String,AttributeValue>> itemsCopy = new java.util.ArrayList<java.util.Map<String,AttributeValue>>(items.size());
        itemsCopy.addAll(items);
        this.items = itemsCopy;
    }
152629
protected void setObjects(PreparedStatement ps, Object... objects)
            throws SQLException {
        int index = 1;
        for (Object obj : objects) {
            ps.setObject(index, obj);
            index++;
        }
    }
1277725
public function setItemsPerPage( $items_per_page )
	{
		if ( !is_int( $items_per_page ) )
		{
			trigger_error( 'Pagination setItemsPerPage: Items per page must be an integer.' );
			return false;
		}

		if ( $items_per_page <= 0 )
		{
			trigger_error( 'Pagination setItemsPerPage: Items per page must be a positive integer.' );
			return false;
		}

		$this->items_per_page = $items_per_page;
	}
845925
public static <T> Iterable<PSArray<T>> create(Iterable<T> items, final Comparator<T> comparator) {
        MutableArray<T> initial = MutableArrayFromIterable.create(items);
        GoodSortingAlgorithm.getInstance().sort(initial, comparator);
        return IterableUsingStatusUpdater.create(initial, new Updater<PSArray<T>>() {
            @Override
            public PSArray<T> getUpdatedOrNull(PSArray<T> current) {
                MutableArray<T> next = MutableArrayFromIterable.create(current);
                boolean success = NextPermutation.step(next, comparator);
                return success ? next : null;
            }
        });
    }
977030
public void setSections(final List<Section> SECTIONS) {
        getSections().setAll(SECTIONS);
        getSections().sort(new SectionComparator());
        fireTileEvent(SECTION_EVENT);
    }
411234
public void setSortOrder(boolean ascending) {
		PdfObject o = get(PdfName.S);
		if (o instanceof PdfName) {
			put(PdfName.A, new PdfBoolean(ascending));
		}
		else {
			throw new IllegalArgumentException("You have to define a boolean array for this collection sort dictionary.");
		}
	}
630373
public void setItems (Array<T> newItems) {
		items.clear();
		items.addAll(newItems);
		currentIndex = 0;
		invalidateDataSet();
	}
244099
public function setItemList( $items )
	{
		if( !is_array( $items ) )
			throw new Exception( 'Item List must be an Array.' );
		$this->items	= array();
		foreach( $items as $item )
			$this->addItem( $item );
	}
479031
protected function _setSortingParameters()
    {
        $sSortingParameters = $this->getViewParameter('sorting');
        if ($sSortingParameters) {
            list($sSortBy, $sSortDir) = explode('|', $sSortingParameters);
            $this->setItemSorting($this->getSortIdent(), $sSortBy, $sSortDir);
        }
    }
1333239
public void setItems(java.util.Collection<Authorizer> items) {
        if (items == null) {
            this.items = null;
            return;
        }

        this.items = new java.util.ArrayList<Authorizer>(items);
    }
92881
public void setItems(java.util.Collection<RouteResponse> items) {
        if (items == null) {
            this.items = null;
            return;
        }

        this.items = new java.util.ArrayList<RouteResponse>(items);
    }
1133928
private function removeFromCollection(&$collection, $items)
    {
        if (is_array($collection)) {
            foreach ($items as $item) {
                foreach ($collection as $index => $v) {
                    if (spl_object_hash($item) == spl_object_hash($v)) {
                        unset($collection[$index]);
                    }
                }
            }
        } else {
            foreach ($items as $item) {
                $collection->removeElement($item);
            }
        }
    }
1308473
public <T> void setItems(@NonNull List<T> items) {
    adapter = new MaterialSpinnerAdapter<>(getContext(), items)
        .setPopupPadding(popupPaddingLeft, popupPaddingTop, popupPaddingRight, popupPaddingBottom)
        .setBackgroundSelector(backgroundSelector)
        .setTextColor(textColor);
    setAdapterInternal(adapter);
  }
1122801
public boolean addItems(Collection<T> items) {
        if (items.isEmpty()) return false;
        int previousSize = getItemCount();
        if (mListItems.addAll(items)) {
            notifyItemRangeInserted(previousSize, items.size());
            return true;
        }
        return false;
    }
135785
public void setItems(java.util.Collection<BasePathMapping> items) {
        if (items == null) {
            this.items = null;
            return;
        }

        this.items = new java.util.ArrayList<BasePathMapping>(items);
    }
1356831
public function putItems(array $items)
    {
        foreach ($items as $k => $v) {
            $this->putItem($k, $v);
        }
    }