sets an item at the given position, overwriting the previous item

@param position the global position
@param item     the item to set
356786
public FastAdapterDialog<Item> set(int position, Item item) {
        mItemAdapter.set(position, item);
        return this;
    }
961498
public ModelAdapter<?, Item> set(int position, Item item) {
        if (mOriginalItems != null) {
            if (mItemAdapter.isUseIdDistributor()) {
                mItemAdapter.getIdDistributor().checkId(item);
            }
            mOriginalItems.set(getAdapterPosition(mItemAdapter.getAdapterItems().get(position)) - mItemAdapter.getFastAdapter().getPreItemCount(position), item);
            publishResults(mConstraint, performFiltering(mConstraint));
            return mItemAdapter;
        } else {
            return mItemAdapter.setInternal(position, item);
        }
    }
1020988
public void updateItem (T item)
    {
        if (_items == null) {
            return;
        }
        int idx = _items.indexOf(item);
        if (idx == -1) {
            _items.add(0, item);
        } else {
            _items.set(idx, item);
        }
    }
1373807
protected void onItemClick(View view, int position){
        if(itemClickListener != null) itemClickListener.onItemClick(view, getItem(position), position);
    }
323641
public void removeItemByPosition(int position) {
        if (mDrawerBuilder.checkDrawerItem(position, false)) {
            mDrawerBuilder.getItemAdapter().remove(position);
        }
    }
1259225
private void put(T item) {
        HashMap<String,Object> keys;

        if( item == null ) {
            throw new NullPointerException("Multi caches may not have null values.");
        }
        keys = getKeys(item);
        synchronized( this ) {
            for( String key : caches.keySet() ) {
                ConcurrentCache<Object,T> cache = caches.get(key);
                Object ob = keys.get(key);

                if( ob instanceof BigDecimal ) {
                    ob = ((BigDecimal)ob).longValue();
                }
                cache.put(ob, item);
            }
        }
    }
459831
public void setPosition(GeoPosition coordinate)
    {
        GeoPosition old = getPosition();
        this.position = coordinate;
        firePropertyChange("position", old, getPosition());
    }
40978
public void updateItemAtPosition(@NonNull IDrawerItem drawerItem, int position) {
        if (mDrawerBuilder.checkDrawerItem(position, false)) {
            mDrawerBuilder.getItemAdapter().set(position, drawerItem);
        }
    }
508084
public final void add(@NonNull final AbstractItem item) {
        Condition.INSTANCE.ensureNotNull(item, "The item may not be null");
        items.add(item);

        if (item instanceof Item && ((Item) item).getIcon() != null) {
            iconCount++;
        } else if (item instanceof Divider) {
            dividerCount++;
        }

        rawItems = null;
        notifyOnDataSetChanged();
    }
754801
public void addItemAtPosition(@NonNull IDrawerItem drawerItem, int position) {
        mDrawerBuilder.getItemAdapter().add(position, drawerItem);
    }
281125
protected ItemData putItem(ItemData item)
   {
      if (item.isNode())
      {
         return putNode((NodeData)item, ModifyChildOption.MODIFY);
      }
      else
      {
         return putProperty((PropertyData)item, ModifyChildOption.MODIFY);
      }
   }
1120343
public function setItemPosition($position)
    {
        if ((int)$position >= 0) {
            // check if given position is larger as possible position
            if ($position >= ($countItems = $this->countItems())) {
                // set position to max possible position
                $position = $countItems - 1;
            }

            if ($position <= ($this->countItems() / 2)) {
                $this->getIteratorObject()->rewind();
                if (($countItems = $this->countItems()) > 0) {
                    $this->_itemPosition = $countItems - 1;
                } else {
                    $this->_itemPosition = 0;
                }

                // go with next
                while ($position != $this->_itemPosition) {
                    $this->getIteratorObject()->next();

                    if (!$this->getIteratorObject()->valid()) {
                        throw new IteratorDecoratorReverseException('Specified position is not valid (next).', E_NOTICE);
                        break;
                    } else {
                        $this->_itemPosition--;
                    }
                }
            } else {
                $this->getIteratorObject()->last();

                if (!$this->getIteratorObject()->valid()) {
                    $this->_itemPosition = 0;
                } else {
                    $this->_itemPosition = 0;
                }

                // go with prev
                while ($position != $this->_itemPosition) {
                    $this->getIteratorObject()->previous();

                    if (!$this->getIteratorObject()->valid()) {
                        throw new IteratorDecoratorReverseException('Specified position is not valid (previous).', E_NOTICE);
                        break;
                    } else {
                        $this->_itemPosition++;
                    }
                }
            }
        } else {
            throw new IteratorDecoratorReverseException('Specified position is not valid.', E_WARNING);
        }
    }
1199053
public FastItemAdapter<Item> add(int position, List<Item> items) {
        getItemAdapter().add(position, items);
        return this;
    }
988280
protected void removeBy(int position) {
        if (mGroupBasicAdapter != null) {
            if (position < mGroupBasicAdapter.getItemCount() && position >= 0) {
                BaseCell removeCell = mGroupBasicAdapter.getItemByPosition(position);
                removeBy(removeCell);
            }
        }
    }
1062900
public void enqueue(T item) {
        queue[head] = item;
        head++;
        size++;
        if (head == queue.length) head = 0;
    }
1322586
public synchronized void addItem(T item) {
        synchronized (items) {
            items.add(item);
        }
//        clusterMarker.setMarkerBitmap();
        if (center == null) {
            center = item.getLatLong();
        } else {
            // computing the centroid
            double lat = 0, lon = 0;
            int n = 0;
            synchronized (items) {
                for (T object : items) {
                    if (object == null) {
                        throw new NullPointerException("object == null");
                    }
                    if (object.getLatLong() == null) {
                        throw new NullPointerException("object.getLatLong() == null");
                    }
                    lat += object.getLatLong().latitude;
                    lon += object.getLatLong().longitude;
                    n++;
                }
            }
            center = new LatLong(lat / n, lon / n);
        }
    }
802334
public void add(T item) {
        CompletableFuture<Queue<T>> pending;
        Queue<T> result = null;
        synchronized (this.contents) {
            Exceptions.checkNotClosed(this.closed, this);
            this.contents.addLast(item);
            pending = this.pendingTake;
            this.pendingTake = null;
            if (pending != null) {
                result = fetch(this.contents.size());
            }
        }

        if (pending != null) {
            pending.complete(result);
        }
    }