Adds a new item to the adapter.

@param item
The item, which should be added, as an instance of the class {@link AbstractItem}.
The item may not be null
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();
    }
791850
public final void set(final int index, @NonNull final AbstractItem item) {
        Condition.INSTANCE.ensureNotNull(item, "The item may not be null");
        AbstractItem replacedItem = items.set(index, item);

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

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

        rawItems = null;
        notifyOnDataSetChanged();
    }
870739
@Override
    public void add(TopLevelItem item) throws IOException {
        synchronized (this) {
            jobNames.add(item.getRelativeNameFrom(getOwner().getItemGroup()));
        }
        save();
    }
1152563
@Override
    public void save(T item) {
        Serializable idValue = getOrGenerateIdValue(item);
        save(idValue, item);
    }
778929
public void add(@Nullable T item) throws Exception {
		if (exception == null) {
			if (take != null) {
				assert isEmpty();
				SettablePromise<T> take = this.take;
				this.take = null;
				take.set(item);
				if (exception != null) throw exception;
				return;
			}

			doAdd(item);
		} else {
			tryRecycle(item);
			throw exception;
		}
	}
1006940
public function add($item)
    {
        $allItems = $this->getAll();
        if (is_array($item)) {
            $allItems = array_merge($allItems, $item);
        } else {
            $allItems[] = $item;
        }

        $this->setAll($allItems);
    }
561523
public void setItem(java.util.Collection<ExportJobResponse> item) {
        if (item == null) {
            this.item = null;
            return;
        }

        this.item = new java.util.ArrayList<ExportJobResponse>(item);
    }
1128741
public void setItem(java.util.Collection<EndpointResponse> item) {
        if (item == null) {
            this.item = null;
            return;
        }

        this.item = new java.util.ArrayList<EndpointResponse>(item);
    }
570815
public void insertItem (T item, int index, String label)
    {
        insertItem(label == null ? toLabel(item) : label, index);
        _items.add(index, item);
    }
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)");
    }
80198
protected void putItem(final ItemData data)
   {
      cache.put(new CacheId(data.getIdentifier()), new CacheValue(data, System.currentTimeMillis() + liveTime));
      cache.put(new CacheQPath(data.getParentIdentifier(), data.getQPath(), ItemType.getItemType(data)),
         new CacheValue(data, System.currentTimeMillis() + liveTime));
   }
731702
public synchronized void put(byte item)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "put", Byte.valueOf(item));

      checkValid();
      getCurrentByteBuffer(1).put(item);

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "put");
   }
136321
public void addActionComponent( JComponent item )
  {
    if( !SwingUtilities.isEventDispatchThread() )
    {
      throw new RuntimeException( "Whoops!  UpdateNotifier is restricted to the EventDispatch thread." );
    }
    _mapItems.put( item, null );
  }
652947
def append(self, item):
        
        if isinstance(item, list):
            self.extend(item)
        elif not self:
            list.append(self, item)
        elif item.__class__ == self[0].__class__:
            list.append(self, item)
        else:
            raise exceptions.WrongListItemType(item.__class__.__name__,
                                               self[0].__class__.__name__)
281125
protected ItemData putItem(ItemData item)
   {
      if (item.isNode())
      {
         return putNode((NodeData)item, ModifyChildOption.MODIFY);
      }
      else
      {
         return putProperty((PropertyData)item, ModifyChildOption.MODIFY);
      }
   }
16261
public void addItem(Point coordinates, Drawable item) {
	assertEDT();
	if (coordinates == null || item == null) {
	    throw new IllegalArgumentException("Coordinates and added item cannot be null");
	}
	log.trace("[addItem] New item added @ {}", coordinates);
	getPanelAt(coordinates).addModel(item);
	getPanelAt(coordinates).repaint();

    }
1118573
public void put(T item, String itemId) throws Exception
    {
        put(item, itemId, 0, null);
    }