Adds a data instance.

@param data the data to put in the list.
168099
public void addElement(T data) {

    Node<T> newNode = new Node<T>(data);

    if (isEmpty()) {
      //
      // if it is the very first node in the list
      first = newNode;
      size = 1;
    }
    else {

      // if this node is greater than the list's head
      //
      if (this.comparator.compare(newNode.data, first.data) > 0) {
        Node<T> tmp = first;
        first = newNode;
        first.next = tmp;
        tmp.prev = first;
        size++;
      }
      else {

        Node<T> prev = first;
        Node<T> current = first.next;

        while (current != null) {

          // if this node is the current node less than the new one
          //
          if (this.comparator.compare(newNode.data, current.data) > 0) {
            prev.next = newNode;
            newNode.prev = prev;
            current.prev = newNode;
            newNode.next = current;
            size++;
            break;
          }
          current = current.next;
          prev = prev.next;

        }

        // if all list elements are greater than the new one
        //
        if (null == current) {
          prev.next = newNode;
          newNode.prev = prev;
          size++;
        }

        if (size > this.maxSize) {
          dropLastElement();
        }

      }
    }

  }
1059414
def add(self, data):
        
        for host in data:
            for key in data[host]:
                if not data[host][key] == []:
                    self.add_item(host, key, data[host][key])
735649
public void addData(final Data DATA) {
        sum += DATA.getValue();
        window.add(DATA);
        if (window.size() > numberPeriod) {
            sum -= window.remove().getValue();
        }
    }
367502
public boolean add(SpdData data) {
        if (data == null)
            return false;
        if (data instanceof SpdStat) {
            return super.add(data);
        } else {
            return false;
        }
    }
932626
def add_data(self, data):  # add append option later
        
        df = pd.DataFrame(data)
        name, dtype = self.get_singular_and_plural_dtype(self.dtype)
        if name in df.columns:
            df.index = df[name]
        df.index.name = name + " name"
        self.df = df
717674
public void append(final byte[] data, final int start, final int len) {
		final int oldLength = this.bytes.length;
		setCapacity(this.bytes.length + len, true);
		System.arraycopy(data, start, this.bytes, oldLength, len);
	}
1361400
public void addDataId(Object dataId) {
	  if (lock == SET) {
		 throw new IllegalStateException("EntryInfo is locked");
	  }
	  if (dataId != null && !dataId.equals("")) {
		  dataIds.add(dataId);
	  }
   }
1157215
public void handleData(String data) {
		value = Double.valueOf(data);
		sendEvent(new SlideEvent(this.user, getPayload(), value));
		if (handler != null)
			handler.slide(value);
	}
372810
public void setData(@Nullable List<C> data) {
        Preconditions.checkState(mGroupBasicAdapter != null, "Must call bindView() first");
        MVHelper mvHelper = (MVHelper) mServices.get(MVHelper.class);
        if (mvHelper != null)
            mvHelper.reset();
        this.mGroupBasicAdapter.setData(data);
    }
626483
public function addData($data) : void
    {
        Assert::isInstanceOfAny($data, [Chunk::class, X509Certificate::class]);
        $this->data[] = $data;
    }
1007086
@Override
	public void updateComponent(final Object data) {
		MyData myData = (MyData) data;
		name.setText("<B>" + myData.getName() + "</B>");
		count.setText(String.valueOf(myData.getCount()));
	}
646099
public void addData(final char[] data, final int off, final int size) {
        if(size<1){
            return;
        }
        final String str = new String(data, off, size);
        if (str.contains("\n")) {
            final String[] lines = str.split("\\r?\\n", -1);
            for (int i = 0 ; i < lines.length - 1 ; i++) {
                appendString(lines[i], true);
            }
            if (lines.length > 0) {
                final String last = lines[lines.length - 1];
                if ("".equals(last)) {
                    //end of previous line
                } else {
                    appendString(last, false);
                }
            }
        } else if (str.contains("\r")) {
            final String[] lines = str.split("\\r", -1);
            for (int i = 0 ; i < lines.length - 2 ; i++) {
                appendString(lines[i], true);
            }
            //last two split strings
            //a: 1,1: yes,no
            //b: 0,1: yes,no
            //c: 0,0: yes(pass),no
            //d: 1,0: yes(pass),
            if (lines.length >= 2) {
                final String last2 = lines[lines.length - 2];

                final String last = lines[lines.length - 1];
                if (!"".equals(last)) {
                    appendString(last2, true);
                    appendString(last, false);
                } else {
                    //pass \r for later \r\n resolution
                    appendString(last2 + "\r", false);
                }
            }
        } else {
            appendString(str, false);
        }
    }
939941
@Override
  public void set(Object data, Class<?>... typeSpecs) {
    this.reset();
    this.mDefaultTypeSpecs = typeSpecs;
    this.add(data, typeSpecs);
  }
866615
public void appendData(byte[] data) throws IOException, SymmetricKeyException {
        if (data == null)
            return;
        appendData(data, 0, data.length);
    }
224710
public void put(int[] data) {
    final int l = data.length;
    for(int i = 0; i < l; i++) {
      put(data[i]);
    }
  }
1364052
public void setImagesData(List data) {
        if (data == null || data.isEmpty()) {
            this.setVisibility(GONE);
            return;
        } else {
            this.setVisibility(VISIBLE);
        }

        if (mMaxSize > 0 && data.size() > mMaxSize) {
            data = data.subList(0, mMaxSize);
        }

        int[] gridParam = calculateGridParam(data.size());
        mRowCount = gridParam[0];
        mColumnCount = gridParam[1];
        if (mImgDataList == null) {
            int i = 0;
            while (i < data.size()) {
                ImageView iv = getImageView(i);
                if (iv == null)
                    return;
                addView(iv, generateDefaultLayoutParams());
                i++;
            }
        } else {
            int oldViewCount = mImgDataList.size();
            int newViewCount = data.size();
            if (oldViewCount > newViewCount) {
                removeViews(newViewCount, oldViewCount - newViewCount);
            } else if (oldViewCount < newViewCount) {
                for (int i = oldViewCount; i < newViewCount; i++) {
                    ImageView iv = getImageView(i);
                    if (iv == null) {
                        return;
                    }
                    addView(iv, generateDefaultLayoutParams());
                }
            }
        }
        mImgDataList = data;
        requestLayout();
    }
1037620
public void addIndex(ValidationData data) {
        for (ValidationDataIndex idx : this.idxs) {
            ValidationIndexUtil.addIndexData(data, idx);
        }
    }