Manually update an item's display in the list

        :param item: The item to be updated.
545224
def update(self, item):
        
        self.model.set(self._iter_for(item), 0, item)
733239
public void update(final long item) {
    if (itemsSeen_ == MAX_ITEMS_SEEN) {
      throw new SketchesStateException(
          "Sketch has exceeded capacity for total items seen: " + MAX_ITEMS_SEEN);
    }

    if (itemsSeen_ < reservoirSize_) { // initial phase, take the first reservoirSize_ items
      if (itemsSeen_ >= currItemsAlloc_) {
        growReservoir();
      }
      assert itemsSeen_ < currItemsAlloc_;
      // we'll randomize replacement positions, so in-order should be valid for now
      data_[(int) itemsSeen_] = item; // since less than reservoir size, cast is safe
      ++itemsSeen_;
    } else { // code for steady state where we sample randomly
      ++itemsSeen_;
      // prob(keep_item) < k / n = reservoirSize_ / itemsSeen_
      // so multiply to get: keep if rand * itemsSeen_ < reservoirSize_
      if ((SamplingUtil.rand.nextDouble() * itemsSeen_) < reservoirSize_) {
        final int newSlot = SamplingUtil.rand.nextInt(reservoirSize_);
        data_[newSlot] = item;
      }
    }
  }
1294644
def append(self, item):
        
        self._deque.append(item)
        self.notEmpty.set()
968700
def update_reminder_item(self, reminder_item_id, reminder_item_dict):
        
        return self._create_put_request(
            resource=REMINDER_ITEMS,
            billomat_id=reminder_item_id,
            send_data=reminder_item_dict
        )
843661
public void replaceItem(CmsListItem item) {

        CmsListItem oldItem = getList().getItem(item.getId());
        if (oldItem != null) {
            int index = getList().getWidgetIndex(oldItem);
            getList().removeItem(oldItem);
            if (index >= getList().getWidgetCount()) {
                getList().addItem(item);
            } else {
                getList().insertItem(item, index);
            }
        }
    }
1096545
def update(self, item):
        
        if item.matrix not in self.data:
            self.data[item.matrix] = []

        result = Select(self.data[item.matrix]).where(
            lambda entry: entry.stage == item.stage).build()

        if len(result) > 0:
            stage = result[0]
            stage.status = item.status
            stage.add(item.timestamp, item.information)
        else:
            stage = CollectorStage(stage=item.stage, status=item.status)
            stage.add(item.timestamp, item.information)
            self.data[item.matrix].append(stage)
14070
def push(self, item, *, index=None):
        
        if index is None:
            self.__list.append(item)
        else:
            self.__list.insert(index, item)
        name = getattr(item, 'name', None)
        if name is not None:
            self.__dict[name] = item
643664
def append(self, item):
        
        self.check_insertion(item)

        self.real_list.append(item)
        self._items |= {item}
25340
@Override
    public void addOrUpdateItem(T item) {
        synchronized (LOCK) {
            // Update memory cache
            cache.onObjectUpdated(item.getEngineId(), item);

            List<T> items = new ArrayList<T>();
            items.add(item);
            asyncStorageInt.addOrUpdateItems(items);

            for (ListEngineDisplayListener<T> l : listeners) {
                l.addOrUpdate(item);
            }
        }
    }
163197
public void addItem(T item) {
        mListItems.add(item);
        notifyItemInserted(mListItems.indexOf(item));
    }
394887
def append(self, item):
        
        if item in self:
            self.items[item[0]].append(item[1])
        else:
            self.items[item[0]] = [item[1]]
32632
def remove(self, item):
        
        if item not in self:
            raise ValueError('objectlist.remove(item) failed, item not in list')
        item_path = self._view_path_for(item)
        giter = self._iter_for(item)
        del self[giter]
        self.emit('item-removed', item, item_path)
990765
def __updateDataItem(self):
        """"""
        uri = self.getUri()        
        self.__dataItem = self.__parseResponseServer(uri)
558255
def append(self, item):
        
        try:
            self._data[self._position] = item
        except IndexError:
            self._grow()
            self._data[self._position] = item
        self._position += 1
        return self
355823
def add_item(self, item):
        
        self.items.append(item)
        self.last_updated = datetime.datetime.now()
1310615
def add(self, item):
        
        if isinstance(item, list):
            self.rows.append(Row(item))
        elif isinstance(item, Row):
            self.rows.append(item)
        else:
            raise InvalidMessageItemError(item, item.__class__)
1353568
def insert_data_item(self, before_index, data_item, auto_display: bool = True) -> None:
        
        assert data_item is not None
        assert data_item not in self.data_items
        assert before_index <= len(self.data_items) and before_index >= 0
        assert data_item.uuid not in self.__uuid_to_data_item
        # update the session
        data_item.session_id = self.session_id
        # insert in internal list
        self.__insert_data_item(before_index, data_item, do_write=True)
        # automatically add a display
        if auto_display:
            display_item = DisplayItem.DisplayItem(data_item=data_item)
            self.append_display_item(display_item)