Add and get t.

@param <T>        the type parameter
@param collection the collection
@param item       the item
@return the t
432661
public static <T> T addAndGet(Collection<T> collection, T item) {
        collection.add(item);
        return item;
    }
652408
public ListBuilder<T> addAll(int index, Collection<? extends T> items) {
        list.addAll(index, items);
        return this;
    }
1075471
public void addAll(Collection<? extends M> collection) {
        if (collection != null) {
            items.addAll(collection);
            applyFilter();
        }
    }
894534
public static <T> Collection<T> addNotNull(Collection<T> to, T what) {
        Collection<T> data = safeCollection(to);
        if (what != null) {
            data.add(what);
        }
        return data;
    }
70061
public static <T> Collection<T> addAll(Collection<T> collection, Object value) {
		return addAll(collection, value, TypeUtil.getTypeArgument(collection.getClass()));
	}
188213
@SuppressWarnings("unchecked")
        public <Coll extends CollectionFuncSup<T>> Coll add(T t) {
                Collection<T> coll = (Collection<T>) iterable;
                coll.add(t);
                return (Coll) this;
        }
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;
    }
1355474
public final <C extends Collection<? super T>> C copyInto(C collection) {
        requireNonNull(collection);
        for (T item : this) {
            collection.add(item);
        }
        return collection;
    }
1210524
int addAll(T... items) {
        int positionOfInsert = mObjects.size();
        Collections.addAll(mObjects, items);
        return positionOfInsert;
    }
287535
@SuppressWarnings({"unchecked", "ManualArrayToCollectionCopy"})
    public static <E, T extends E> Collection<E> addAll(Collection<E> c, T... array){
        for(T obj: array)
            c.add(obj);
        return c;
    }
471621
public void addItem(@Nonnull final ExpressionItem item) {
    if (item == null) {
      throw new PreprocessorException("[Expression]Item is null", this.sources, this.includeStack, null);
    }

    if (last.isEmptySlot()) {
      last = new ExpressionTreeElement(item, this.includeStack, this.sources);
    } else {
      last = last.addTreeElement(new ExpressionTreeElement(item, this.includeStack, this.sources));
    }
  }
907827
public long get(T item) {
        MutableLong count = map.get(item);
        return count == null ? 0 : count.value;
    }
990176
int addAll(Collection<? extends T> collection) {
        int positionOfInsert = mObjects.size();
        mObjects.addAll(collection);
        return positionOfInsert;
    }
974263
public synchronized void addItem(final T item) {
        // Log.w(TAG,"public synchronized void addItem(T item) {... (START)");
        // if mapView is not inflated or if not in viewport, add to leftItems
        if (mapView.getWidth() == 0 || !isItemInViewport(item)) {
//            Log.i(TAG,"public synchronized void addItem(T item) {... (1)");
            synchronized (leftItems) {
                // Log.w(TAG,"public synchronized void addItem(T item) {... (2)");
                if (clusterTask != null && clusterTask.isCancelled()) return;
                leftItems.add(item);
            }
        } else if (maxClusteringZoom >= mapView.getModel().mapViewPosition
                .getZoomLevel()) {
            // else add to a cluster;
            Point pos = mapView.getMapViewProjection().toPixels(item.getLatLong());
            // check existing cluster
//            Log.i(TAG,"spublic synchronized void addItem(T item) {...... (3)");
            synchronized (clusters) {
                // Log.w(TAG,"spublic synchronized void addItem(T item) {...... (4)");
                for (Cluster<T> mCluster : clusters) {
//                    Log.i(TAG,"public synchronized void addItem(T item) {... (5)");
                    if (clusterTask != null && clusterTask.isCancelled()) return;
                    if (mCluster.getItems().size() == 0)
                        throw new IllegalArgumentException("cluster.getItems().size() == 0");
                    // find a cluster which contains the marker.
                    // use 1st element to fix the location, hinder the cluster from
                    // running around and isClustering.
                    LatLong gpCenter = mCluster.getItems().get(0)
                            .getLatLong();
                    if (gpCenter == null)
                        throw new IllegalArgumentException();
                    Point ptCenter = mapView.getMapViewProjection().toPixels(gpCenter);
                    // find a cluster which contains the marker.
                    if (pos.distance(ptCenter) <= GRIDSIZE
                    /*
                     * pos.x >= ptCenter.x - GRIDSIZE && pos.x <= ptCenter.x +
                     * GRIDSIZE && pos.y >= ptCenter.y - GRIDSIZE && pos.y <=
                     * ptCenter.y + GRIDSIZE
                     */) {
                        mCluster.addItem(item);
                        return;
                    }
                } // END: for (Cluster<T> cluster : clusters) {
                // No cluster contain the marker, create a new cluster.
                clusters.add(createCluster(item));
            } // END: synchronized (clusters) {
        } else {
            // No clustering allowed, create a new cluster with single item.
            synchronized (clusters) {
//                Log.i(TAG,"public synchronized void addItem(T item) {... (6)");
                clusters.add(createCluster(item));
            }
        }
//        Log.i(TAG,"public synchronized void addItem(T item) {... (END)");
    }
418090
public static <T> Collection<T> addAll(Collection<T> list, T... array)
    {
        for (T item : array)
        {
            list.add(item);
        }
        return list;
    }
122009
public CommerceExtendedData addItem(Item item) throws JSONException {
		if (this.items == null) {
			this.items = new ArrayList<>();
		}
		items.add(item);
		return this;
	}
163197
public void addItem(T item) {
        mListItems.add(item);
        notifyItemInserted(mListItems.indexOf(item));
    }