Adds an element at the beginning of the list.

@param element
the element to add.

@return a reference to the newly added element.
339621
public ElementReference pushFront(E element) {
        T entry = makeEntry(element);
        pushFrontEntry(entry);
        return entry;
    }
22525
private boolean insert(T element) {
        if (!entries.containsKey(element)) {
            head = createEntry(element, head);
            entries.put(element, head);
            return true;
        }
        return false;
    }
138655
public ElementsBuilder addAll(IsElement... elements) {
        for (IsElement element : elements) {
            add(element);
        }
        return that();
    }
341825
public void add(double element) {
	// overridden for performance only.  
	if (size == elements.length) ensureCapacity(size + 1); 
	elements[size++] = element;
}
308792
public void addElement(Element element, int sortOrder) {
        final String deepName = getDeepName(element);
        elementNameSortOrderMap.put(deepName, sortOrder);

    }
226773
@Override
  public boolean add(int element)
  {
    if (element < 0) {
      throw new IndexOutOfBoundsException("element < 0: " + element);
    }
    int index = findElementOrRemoved(element);
    if (index >= 0) {
      if (cells[index] == element) {
        return false;
      }
      freecells--;
    } else {
      index = -(index + 1);
    }

    modCount++;
    size++;

    // set the integer
    cells[index] = element;

    // do we need to rehash?
    if (1 - ((double) freecells / cells.length) > LOAD_FACTOR) {
      rehash();
    }
    return true;
  }
422406
public ElementId addReferenced(char[] buffer, int start, int len, int hash,
                                   Location loc, PrefixedName elemName, PrefixedName attrName)
    {
        int index = (hash & mIndexMask);
        ElementId id = mTable[index];

        while (id != null) {
            if (id.idMatches(buffer, start, len)) { // found existing one
                return id;
            }
            id = id.nextColliding();
        }

        // Not found, need to create a placeholder...

        // But first, do we need more room?
        if (mSize >= mSizeThreshold) {
            rehash();
            // Index changes, for the new entr:
            index = (hash & mIndexMask);
        }
        ++mSize;

        // Ok, then, let's create the entry
        String idStr = new String(buffer, start, len);
        id = new ElementId(idStr, loc, false, elemName, attrName);

        // First, let's link it to Map; all ids have to be connected
        id.setNextColliding(mTable[index]);
        mTable[index] = id;

        // And then add the undefined entry at the end of list
        if (mHead == null) {
            mHead = mTail = id;
        } else {
            mTail.linkUndefined(id);
            mTail = id;
        }
        return id;
    }
1142748
public int addUniqueElement(int element, int treap) {
		int treap_;
		if (treap == -1) {
			if (m_defaultTreap == nullNode())
				m_defaultTreap = createTreap(-1);
			treap_ = m_defaultTreap;
		} else {
			treap_ = treap;
		}

		return addElement_(element, 1, treap_);
	}
1359887
public E insert(E element) {
        E evicted = null;
        if (size() >= capacity) {
            if (evictPolicy == EvictPolicy.REJECT_NEW) {
                // reject the new element
                return element;
            }
            // Evict first, so we do not need to resize
            evicted = evict();
        }
        deque.offerLast(element);
        return evicted;
    }
874219
public function addElement($element){

        $elements = $this->formElements;
        $elements[] = $element;

        $this->formElements = $elements;

        return $this;
    }
134800
@Override
  @NullSafe
  public synchronized void add(T element) {

    Optional.ofNullable(element)
      .ifPresent(it -> {

        int hashCode = it.hashCode();
        int index = (hashCode % getScale());

        BloomFilter<T> bloomFilter = resolveBloomFilter(index);

        bloomFilter.add(it);
      });
  }
733058
private void add(Element element)
    {
        if (ivElements == null)
        {
            ivElements = new Element[DEFAULT_CAPACITY];
        }
        else if (ivTailIndex == ivElements.length)
        {
            // No more room at the tail of the array.  If we're completely out of
            // space (ivBaseIndex == 0), then we need a bigger array.  Otherwise,
            // determine if we can reset ivBaseIndex to 0 without needing to copy
            // more than half the elements.  If not, we allocate a new array.
            //
            // We choose to limit to half the array to avoid repeatedly copying
            // the array.  For example, if the array is full and ivBaseIndex == 0,
            // and we have a sequence of remove(0)/add(x), we do not want:
            //   - remove(0): ivBaseIndex++
            //   - add(x): copy 1..N to 0..N-1, ivBaseIndex=0, array[N] = x
            //   - remove(0): ivBaseIndex++
            //   - add(x): copy 1..N to 0..N-1, ivBaseIndex=0, array[N] = x
            //   - ...etc.

            int size = size();
            int halfCapacity = ivElements.length >> 1;
            if (ivHeadIndex > halfCapacity)
            {
                // Less than half of the array is full.  Rather than creating a new
                // array, just copy all the elements to the front.
                System.arraycopy(ivElements, ivHeadIndex, ivElements, 0, size);
                Arrays.fill(ivElements, ivHeadIndex, ivElements.length, null);
            }
            else
            {
                // Either we're completely out of space (ivBaseIndex == 0), or it
                // would be wasteful to continuously copy over half the elements.
                // Grow the array by half its current size.
                Element[] newElements = new Element[ivElements.length + halfCapacity];
                System.arraycopy(ivElements, ivHeadIndex, newElements, 0, size);
                ivElements = newElements;
            }

            ivHeadIndex = 0;
            ivTailIndex = size;
        }

        ivElements[ivTailIndex++] = element;
    }
1285046
public void add(JsonElement element) {
    if (element == null) {
      element = JsonNull.INSTANCE;
    }
    elements.add(element);
  }
326529
@Override
	public void add(long value, T element) {
		if (root == null) {
			root = new Node<T>(value, element, false);
			first = last = root;
			return;
		}
		root = add(value, element, root);
		root.red = false;
	}
531634
@Override
    public boolean add(T e) {
        if (elements.add(e)) {
            ordered.add(e);
            return true;
        } else {
            return false;
        }
    }
1232018
public T addElement(T element) {
		// make sure that elements are initialized
		getElements();
		if (!containsElement(this.elements, element)) {
			this.elements.add(element);
			element.addChangeListener(this.elementChangeListener);
			element.notifyState();
			return element;
		}
		throw new RuntimeException(element.toString() + " already exists");
	}
15175
public ListBuilder<T> addAll( Iterable<T> elements)
    {
    for( T element : elements)
      {
      list_.add( element);
      }
    
    return this;
    }