Add a datum item into the dataset.
@param x a datum item.
@return the added datum item.
506816
public Datum<E> add(Datum<E> x) {
        data.add(x);
        return x;
    }
1103800
public double add(int[] indices, double val) {
        checkIndices(indices);
        int c = getConfigIdx(indices);
        return values.set(c, s.plus(values.get(c), val));
    }
500573
public void addData(double xOffset, double yOffset, String label) {

    DataPoint dp = new DataPoint(xOffset, yOffset, label);
    dataPointList.add(dp);
  }
709787
public E get(int x, int y) {
		if (columns.size() < x) {
			columns.set(x, new ArrayList<>());
		}
		ArrayList<E> columnList = columns.get(x);
		if (columnList.size() < y) {
			columnList.set(y, this.defaultElement);
		}
		return columnList.get(y);
	}
537616
public XYSeries addSeries(
      String seriesName,
      List<?> xData,
      List<? extends Number> yData,
      List<? extends Number> errorBars) {

    DataType dataType = getDataType(xData);
    switch (dataType) {
      case Date:
        return addSeries(
            seriesName,
            Utils.getDoubleArrayFromDateList(xData),
            Utils.getDoubleArrayFromNumberList(yData),
            Utils.getDoubleArrayFromNumberList(errorBars),
            DataType.Date);

      default:
        return addSeries(
            seriesName,
            Utils.getDoubleArrayFromNumberList(xData),
            Utils.getDoubleArrayFromNumberList(yData),
            Utils.getDoubleArrayFromNumberList(errorBars),
            DataType.Number);
    }
  }
1372516
@Override
  public Container add(final short x) {
    if (cardinality == 0 || (cardinality > 0
            && toIntUnsigned(x) > toIntUnsigned(content[cardinality - 1]))) {
      if (cardinality >= DEFAULT_MAX_SIZE) {
        return toBitmapContainer().add(x);
      }
      if (cardinality >= this.content.length) {
        increaseCapacity();
      }
      content[cardinality++] = x;
    } else {
      int loc = Util.unsignedBinarySearch(content, 0, cardinality, x);
      if (loc < 0) {
        // Transform the ArrayContainer to a BitmapContainer
        // when cardinality = DEFAULT_MAX_SIZE
        if (cardinality >= DEFAULT_MAX_SIZE) {
          return toBitmapContainer().add(x);
        }
        if (cardinality >= this.content.length) {
          increaseCapacity();
        }
        // insertion : shift the elements > x by one position to
        // the right
        // and put x in it's appropriate place
        System.arraycopy(content, -loc - 1, content, -loc, cardinality + loc + 1);
        content[-loc - 1] = x;
        ++cardinality;
      }
    }
    return this;
  }
892250
public int add(T item) {
		
		Integer count = map.get(item);
		
		if(count == null) {
			map.put(item, 1);
			return 1;
		} else {
			map.put(item, count + 1);
			return count + 1;
		}
	}
1061384
public void setData(java.util.Collection<Datum> data) {
        if (data == null) {
            this.data = null;
            return;
        }

        this.data = new java.util.ArrayList<Datum>(data);
    }
1017792
@Override
  public MtasDataCollector<?, ?> add(double valueSum, long valueN)
      throws IOException {
    MtasDataCollector<?, ?> dataCollector = add(false);
    setValue(newCurrentPosition, valueSum, valueN, newCurrentExisting);
    return dataCollector;
  }
998876
public Vector2d add(double x, double y, Vector2d dest) {
        dest.x = this.x + x;
        dest.y = this.y + y;
        return dest;
    }
1221629
public Datum<SparseArray> remove(int i) {
        Datum<SparseArray> datum = data.remove(i);

        n -= datum.x.size();
        for (SparseArray.Entry item : datum.x) {
            colSize[item.i]--;
        }
        
        return datum;
    }
174953
public void add(float datum) {
        sorted = false;
        if (n < k) {
            heap[n++] = datum;
            if (n == k) {
                heapify(heap);
            }
        } else {
            n++;
            if (datum < heap[0]) {
                heap[0] = datum;
                SortUtils.siftDown(heap, 0, k-1);
            }
        }
    }
555682
public Vector2i add(int x, int y, Vector2i dest) {
        dest.x = this.x + x;
        dest.y = this.y + y;
        return dest;
    }
338414
public static UnsignedInteger64 add(UnsignedInteger64 x, int y) {
		return new UnsignedInteger64(x.bigInt.add(BigInteger.valueOf(y)));
	}
543237
public void add(double... point) {
    if(this.ok) {
      this.points = new ArrayList<>(this.points);
      this.ok = false;
    }
    this.points.add(point);
    // Update data set extends
    minmaxX.put(point[0]);
    minmaxY.put(point[1]);
  }
637745
public Datum<E> add(E x, double y) {
        if (response == null) {
            throw new IllegalArgumentException(DATASET_HAS_NO_RESPONSE);
        }
        
        if (response.getType() != Attribute.Type.NUMERIC) {
            throw new IllegalArgumentException(RESPONSE_NOT_NUMERIC);
        }
        
        return add(new Datum<>(x, y));
    }
1082462
public void add(double x, double y) {
    data.add(x);
    data.add(y);
    minx = Math.min(minx, x);
    maxx = Math.max(maxx, x);
    miny = Math.min(miny, y);
    maxy = Math.max(maxy, y);
  }