Appends the specified element to the end of this Vector.

@param e element to be appended to this Vector
@return {@code true} (as specified by {@link Collection#add})
@since 1.2
547163
public synchronized boolean add(E e) {
        modCount++;
        ensureCapacityHelper(elementCount + 1);
        elementData[elementCount++] = e;
        return true;
    }
419471
public boolean add(Object o) {

        resetCapacity();

        if (endindex == list.length) {
            endindex = 0;
        }

        list[endindex] = o;

        elementCount++;
        endindex++;

        return true;
    }
115644
public boolean remove (E e) {
		for (int i = 0; i < size; i++) {
			E e2 = data[i];

			if (e == e2) {
				data[i] = data[--size]; // overwrite item to remove with last element
				data[size] = null; // null last element, so gc can do its work
				return true;
			}
		}

		return false;
	}
698205
protected boolean addElem(final T element) {
    // validate element
    if (element == null) {
      throw new IllegalArgumentException("Null element is not supported.");
    }
    // find hashCode & index
    final int hashCode = element.hashCode();
    final int index = getIndex(hashCode);
    // return false if already present
    if (containsElem(index, element, hashCode)) {
      return false;
    }

    modification++;
    size++;

    // update bucket linked list
    LinkedElement<T> le = new LinkedElement<T>(element, hashCode);
    le.next = entries[index];
    entries[index] = le;
    return true;
  }
254530
@Override
	public boolean add(E e) {
		if (capacity <= linkedBlockingDeque.size())
			linkedBlockingDeque.removeFirst();
		return linkedBlockingDeque.add(e);
	}
473119
public boolean append(String text) {
        if (get() == null) return set(new StringBuilder(text));
        get().append(text);
        return true;
    }
980983
public boolean addIfAbsent(E e) {
        final ReentrantLock lock = this.lock;
        lock.lock();
        try {
            // Copy while checking if already present.
            // This wins in the most common case where it is not present
            Object[] elements = getArray();
            int len = elements.length;
            Object[] newElements = new Object[len + 1];
            for (int i = 0; i < len; ++i) {
                if (eq(e, elements[i]))
                    return false; // exit, throwing away copy
                else
                    newElements[i] = elements[i];
            }
            newElements[len] = e;
            setArray(newElements);
            return true;
        } finally {
            lock.unlock();
        }
    }
720321
public boolean addAll(Collection<? extends Character> c) {
        boolean retVal = false;
        final Iterator<? extends Character> i = c.iterator();
        int n = c.size();
        while (n-- != 0)
            if (add(i.next())) retVal = true;
        return retVal;
    }
449608
public static List<Element> getChildElements(Element e) {

		List<Element> ret = new ArrayList<Element>();
		NodeList children = e.getChildNodes();

		for (int i = 0; i < children.getLength(); i++) {
			Node child = children.item(i);
			if (child.getNodeType()  == Node.ELEMENT_NODE) {
				ret.add((Element) child);
			}
		}

		return ret;
	}
361254
@Override public int add(@Nullable E element, int occurrences) {
    if (occurrences == 0) {
      return count(element);
    }
    checkArgument(
        occurrences > 0, "occurrences cannot be negative: %s", occurrences);
    Count frequency = backingMap.get(element);
    int oldCount;
    if (frequency == null) {
      oldCount = 0;
      backingMap.put(element, new Count(occurrences));
    } else {
      oldCount = frequency.get();
      long newCount = (long) oldCount + (long) occurrences;
      checkArgument(newCount <= Integer.MAX_VALUE,
          "too many occurrences: %s", newCount);
      frequency.getAndAdd(occurrences);
    }
    size += occurrences;
    return oldCount;
  }
111462
public void addFirst(E e) {
        if (e == null)
            throw new NullPointerException();
        elements[head = (head - 1) & (elements.length - 1)] = e;
        if (head == tail)
            doubleCapacity();
    }
82937
@Override
    public void add(int index, E element) {
        final ReentrantLock lock = this.lock;
        lock.lock();
        try {
            Object[] elements = getArray();
            int len = elements.length;
            if (index > len || index < 0)
                throw new IndexOutOfBoundsException("Index: " + index +
                                                    ", Size: " + len);
            Object[] newElements;
            int numMoved = len - index;
            if (numMoved == 0)
                newElements = Arrays.copyOf(elements, len + 1);
            else {
                newElements = new Object[len + 1];
                System.arraycopy(elements, 0, newElements, 0, index);
                System.arraycopy(elements, index, newElements, index + 1,
                                 numMoved);
            }
            newElements[index] = element;
            setArray(newElements);
        } finally {
            lock.unlock();
        }
    }
765013
@Override
  public boolean addAll(Collection<? extends Character> c) {
    ensureCapacity(size + c.size());
    for (char e : c) {
      elements[size++] = e;
    }
    return c.size() > 0;
  }
477860
public void add(int index, int element)
    {
        if (index == size())//special case, just appending
        {
            add(element);
        }
        else
        {
            boundsCheck(index);
            enlargeIfNeeded(1);
            System.arraycopy(array, index, array, index+1, end-index);
            array[index] = element;
            end++;
        }
    }
60770
public boolean add(E o) {
    	if(o!=null && !contains(o)){
    		return super.add(o);
    	}
    	return false;
    }
1078718
public void appendElements(ExtensionPoint... elements) {
    List<ExtensionPoint> rc = new ArrayList<ExtensionPoint>();
    rc.addAll(Arrays.asList(this.elements));
    rc.addAll(Arrays.asList(elements));
    this.elements = rc.toArray(new ExtensionPoint[0]);
  }
644927
@SuppressWarnings("unchecked")
	public boolean push(E e) {
		if (cntInBucket >= bucketSize) {
			buckets.add((E[]) new Object[bucketSize]);
			cntInBucket = 0;
		}
		buckets.getLast()[cntInBucket++] = e;
		size++;
		return true;
	}