Add {@code :first-of-type} elements.

@see <a href="http://www.w3.org/TR/css3-selectors/#first-of-type-pseudo"><code>:first-of-type</code> pseudo-class</a>
14712
private void addFirstOfType() {
		for (Node node : nodes) {
			Index index = helper.getIndexInParent(node, true);
			if (index.index == 0)
				result.add(node);
		}
	}
308792
public void addElement(Element element, int sortOrder) {
        final String deepName = getDeepName(element);
        elementNameSortOrderMap.put(deepName, sortOrder);

    }
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]);
  }
662460
private void addDerivedTypes() {
		Iterator<DefinedType> typeIter = schema.getTypes().iterator();
		while (typeIter.hasNext()) {
			DefinedType type = typeIter.next();
			// debug (type.getName()+":"+type.getDomain(true).toString());
			// if ((type.getDomain() instanceof SimpleType)==false &&
			// (type instanceof EnumerationType)==false &&
			// (type instanceof SelectType)==false){

			/*
			 * one of the hard things TODO : TYPE IfcCompoundPlaneAngleMeasure =
			 * LIST [3:3] OF INTEGER; WHERE WR1 : { -360 <= SELF[1] < 360 }; WR2
			 * : { -60 <= SELF[2] < 60 }; WR3 : { -60 <= SELF[3] < 60 }; WR4 :
			 * ((SELF[1] >= 0) AND (SELF[2] >= 0) AND (SELF[3] >= 0)) OR
			 * ((SELF[1] <= 0) AND (SELF[2] <= 0) AND (SELF[3] <= 0)); END_TYPE;
			 * 
			 * I am skipping this for now, it only occurs once in the model
			 * future versions should definitely find an answer to this
			 * 
			 * A fix for this has been implemented in addHackedTypes
			 */
			if (type.getName().equalsIgnoreCase("IfcCompoundPlaneAngleMeasure")) {
				EClass testType = getOrCreateEClass(type.getName());
				DefinedType type2 = new DefinedType("Integer");
				type2.setDomain(new IntegerType());
				modifySimpleType(type2, testType);
				testType.getEAnnotations().add(createWrappedAnnotation());
			} else if (type.getDomain() instanceof DefinedType) {
				if (schemaPack.getEClassifier(type.getName()) != null) {
					EClass testType = (EClass) schemaPack.getEClassifier(type.getName());
					DefinedType domain = (DefinedType) type.getDomain();
					EClassifier classifier = schemaPack.getEClassifier(domain.getName());
					testType.getESuperTypes().add((EClass) classifier);
					testType.setInstanceClass(classifier.getInstanceClass());
				} else {
					EClass testType = getOrCreateEClass(type.getName());
					DefinedType domain = (DefinedType) type.getDomain();
					if (simpleTypeReplacementMap.containsKey(domain.getName())) {
						// We can't subclass because it's a 'primitive' type
						simpleTypeReplacementMap.put(type.getName(), simpleTypeReplacementMap.get(domain.getName()));
					} else {
						EClass classifier = getOrCreateEClass(domain.getName());
						testType.getESuperTypes().add((EClass) classifier);
						if (classifier.getEAnnotation("wrapped") != null) {
							testType.getEAnnotations().add(createWrappedAnnotation());
						}
						testType.setInstanceClass(classifier.getInstanceClass());
					}
				}
			}
		}
	}
953867
public void addElement(SimpleCell element) throws BadElementException {
		if(!element.isCellgroup()) {
			throw new BadElementException("You can't add cells to a table directly, add them to a row first.");
		}
		content.add(element);
	}
319822
private void addType(final Queue<String> typeQueue, final AbstractSchemaNode schemaNode) {

		final String _extendsClass = schemaNode.getProperty(SchemaNode.extendsClass);
		if (_extendsClass != null) {

			typeQueue.add(StringUtils.substringBefore(_extendsClass, "<"));
		}

		final String _interfaces = schemaNode.getProperty(SchemaNode.implementsInterfaces);
		if (_interfaces != null) {

			for (final String iface : _interfaces.split("[, ]+")) {

				typeQueue.add(iface);
			}
		}
	}
67833
private void addChildElements() {
		for (Node node : nodes) {
			Collection<? extends Node> childNodes = helper.getChildNodes(node);
			for (Node child : childNodes)
				if (matchTag(child))
					result.add(child);
		}
	}
564634
public boolean add(E e) {
        typeCheck(e);

        long oldElements = elements;
        elements |= (1L << ((Enum<?>)e).ordinal());
        return elements != oldElements;
    }
1145506
private void addAdjacentSiblingElements() {
		for (Node node : nodes) {
			Node n = helper.getNextSibling(node);
			if (n != null)
				if (matchTag(n))
					result.add(n);
		}
	}
138655
public ElementsBuilder addAll(IsElement... elements) {
        for (IsElement element : elements) {
            add(element);
        }
        return that();
    }
496301
public void addPositionalBindings(Object first, Object... others) {
    positionalBindings.add(first);
    positionalBindings.addAll(Arrays.asList(others));
  }
708358
public void addRange(int first, int last) {
        int ele;

        for (ele = first; ele <= last; ele++) {
            add(ele);
        }
    }
1110465
public Datatype.Builder addAllNestedClasses(Spliterator<? extends Excerpt> elements) {
    if ((elements.characteristics() & Spliterator.SIZED) != 0) {
      long elementsSize = elements.estimateSize();
      if (elementsSize > 0 && elementsSize <= Integer.MAX_VALUE) {
        if (nestedClasses instanceof ImmutableList) {
          nestedClasses = new ArrayList<>(nestedClasses);
        }
        ((ArrayList<?>) nestedClasses).ensureCapacity(nestedClasses.size() + (int) elementsSize);
      }
    }
    elements.forEachRemaining(this::addNestedClasses);
    return (Datatype.Builder) this;
  }
1302148
public void addElement(Element element) throws BadElementException {
		if (cellgroup) {
			if (element instanceof SimpleCell) {
				if(((SimpleCell)element).isCellgroup()) {
					throw new BadElementException("You can't add one row to another row.");
				}
				content.add(element);
				return;
			}
			else {
				throw new BadElementException("You can only add cells to rows, no objects of type " + element.getClass().getName());
			}
		}
		if (element.type() == Element.PARAGRAPH
				|| element.type() == Element.PHRASE
				|| element.type() == Element.ANCHOR
				|| element.type() == Element.CHUNK
				|| element.type() == Element.LIST
				|| element.type() == Element.MARKED
				|| element.type() == Element.JPEG
				|| element.type() == Element.JPEG2000
				|| element.type() == Element.JBIG2
				|| element.type() == Element.IMGRAW
				|| element.type() == Element.IMGTEMPLATE) {
			content.add(element);
		}
		else {
			throw new BadElementException("You can't add an element of type " + element.getClass().getName() + " to a SimpleCell.");
		}
	}
368082
@Override
  public boolean addAll(int index, Collection<? extends Float> c) {
    if (index < 0 || index > size) {
      throw new IndexOutOfBoundsException();
    }
    ensureCapacity(size + c.size());
    size += c.size();
    for (int i = size + c.size() - 1, j = size - 1; j >= index; i--, j--) {
      elements[i] = elements[j];
    }
    for (float e : c) {
      elements[index++] = e;
    }
    return c.size() > 0;
  }
1211507
private void addNthChild(final boolean byType) {
		for (Node node : nodes) {
			Index index = helper.getIndexInParent(node, byType);

			if (specifier.isMatch(index.index+1))
				result.add(node);
		}
	}
1040692
public void addExtends(String superType) {
		if (!Strings.isEmpty(superType)) {
			JvmParameterizedTypeReference superTypeRef = newTypeRef(this.container, superType);
			this.sarlInterface.getExtends().add(superTypeRef);
			return;
		}
	}