Add an element

@param element
the element to add
8116
void addElement(KElement element) {
		if (!this.elements.contains(element)) {
			element.setIndex(this.elements.size());
			this.elements.add(element);
		}
	}
479741
public void put(long key, T element) {
		Entry<T> entry = new Entry<T>(key, element);
		elements.add(entry);
		this.numElements++;
		fileElement(entry, true);
	}
1109014
public void add (T element)
    {
        DependencyNode<T> node = new DependencyNode<T>(element);
        _nodes.put(element, node);
        _orphans.add(element);
    }
1089922
public function add($element, $key = null)
    {
        if ($key == null) {
            $this->items[] = $element;

            return;
        }
        $this->set($key, $element);
    }
654371
@Override
    public boolean add(Object element) {
        verifyOperation($addToSet);

        updates.add(DBObjectUtil.toDBObject(element));

        return true;
    }
1235984
public void add(int index, Object element) {

        if (index == size()) {
            add(element);    //Add to the end of this.
        }

        //If index > size() an exception should be thrown with a slightly
        //different message than the exception thrown by getInternal.
        else if (index > size()) {
            throw new IndexOutOfBoundsException("Index out of bounds: "
                                                + index + " > " + size());
        } else {
            Node current = getInternal(index);
            Node newNext = new Node(current.data, current.next);

            current.data = element;
            current.next = newNext;

            elementCount++;

            //If they inserted at the last valid index, then a new last element
            //was created, therfore update the last pointer
            if (last == current) {
                last = newNext;
            }
        }
    }
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");
	}
340721
public void addElement(Element element) {
		synchronized(lock) {
			checkNotFrozen();
			element.setPage(this);
			// elements
			if(elements == null) elements = new ArrayList<>();
			elements.add(element);
			// elementsById
			addToElementsById(element, false);
		}
	}
485617
public void addElements(
                    final Collection<? extends T> elements
                    )
    {
        if (elements == null  ||  elements.size() == 0) {
            return;
        }

        for (T  obj : elements) {
            addElement( obj );
        }
    }
1274573
def add(self, element):
        """"""
        key = self._transform(element)
        if key not in self._elements:
            self._elements[key] = element
109769
public function addElement($element, $name = null) {
		if ($name === null) {
			$this->_elements[] = $element;
		} else {
			$this->_elements[$name] = $element;
		}
		
		return $this;
	}
742440
public void addChildElement(Node element) {
        element.setParent(this);
        emptyElementTag = false; // can't be an empty element tag if you attach child elements
        childElements.add(element);
    }
341825
public void add(double element) {
	// overridden for performance only.  
	if (size == elements.length) ensureCapacity(size + 1); 
	elements[size++] = element;
}
869580
public Element merge(final Element element) {
        types.addAll(element.types);
        possibleValues.addAll(element.possibleValues);
        return this;
    }
276223
def add_element(self, element):
        
        self.elements.append(element)
        self.type_graph.add_element(element)
1256933
public void setElements(
                    final Collection<? extends T> elements
                    )
    {
        clear();
        if (elements == null  ||  elements.size() == 0) {
            return;
        }

        for (T  obj : elements) {
            addElement( obj );
        }
    }
90202
public void add(long date, T element) {
		if (size == 0) {
			elements[0] = element;
			dates[0] = date;
			size = 1;
			oldestIndex = 0;
			newestIndex = 0;
			return;
		}
		if (size < elements.length) {
			elements[size] = element;
			dates[size] = date;
			if (date < dates[oldestIndex]) oldestIndex = size;
			if (date > dates[newestIndex]) newestIndex = size;
			size++;
			return;
		}
		if (dates[oldestIndex] > date) {
			// older than oldest
			if (newestIndex < 0) refreshNewestIndex();
			elements[newestIndex] = element;
			dates[newestIndex] = date;
			oldestIndex = newestIndex;
			newestIndex = -1;
			return;
		}
		if (newestIndex < 0) refreshNewestIndex();
		if (dates[newestIndex] < date) return; // newer than newest
		// replace the newest
		elements[newestIndex] = element;
		dates[newestIndex] = date;
		oldestIndex = newestIndex;
		newestIndex = -1;
		return;
	}