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

@see <a href="http://www.w3.org/TR/css3-selectors/#only-of-type-pseudo"><code>:only-of-type</code> pseudo-class</a>
16428
private void addOnlyOfTypeElements() {
        for (Node node : nodes) {
            Node n = DOMHelper.getPreviousSiblingElement(node);
            while (n != null) {
                if (DOMHelper.getNodeName(n).equals(DOMHelper.getNodeName(node))) {
                    break;
                }
                
                n = DOMHelper.getPreviousSiblingElement(n);
            }
            
            if (n == null) {
                n = DOMHelper.getNextSiblingElement(node);
                while (n != null) {
                    if (DOMHelper.getNodeName(n).equals(DOMHelper.getNodeName(node))) {
                        break;
                    }
                    
                    n = DOMHelper.getNextSiblingElement(n);
                }
                
                if (n == null) {
                    result.add(node);
                }
            }
        }
    }
877690
private void fillWizardPageWithSelectedTypes() {
		final StructuredSelection selection = getSelectedItems();
		if (selection == null) {
			return;
		}
		for (final Iterator<?> iter = selection.iterator(); iter.hasNext();) {
			final Object obj = iter.next();
			if (obj instanceof TypeNameMatch) {
				accessedHistoryItem(obj);
				final TypeNameMatch type = (TypeNameMatch) obj;
				final String qualifiedName = Utilities.getNameWithTypeParameters(type.getType());
				final String message;

				if (addTypeToWizardPage(this.typeWizardPage, qualifiedName)) {
					message = MessageFormat.format(Messages.AbstractSuperTypeSelectionDialog_2,
							TextProcessor.process(qualifiedName, JAVA_ELEMENT_DELIMITERS));
				} else {
					message = MessageFormat.format(Messages.AbstractSuperTypeSelectionDialog_3,
							TextProcessor.process(qualifiedName, JAVA_ELEMENT_DELIMITERS));
				}
				updateStatus(new StatusInfo(IStatus.INFO, message));
			}
		}
	}
589544
private static void mergeWildcardTypes(final List<Type> types, final Type... addition) {
        if (types.isEmpty()) {
            Collections.addAll(types, addition);
            return;
        }
        for (Type add : addition) {
            final Class<?> addClass = GenericsUtils.resolveClass(add);
            final Iterator<Type> it = types.iterator();
            boolean additionApproved = true;
            while (it.hasNext()) {
                final Type type = it.next();
                // it can't contain incompatible generics just because of sane sense (type system will not allow)
                final Class<?> typeClass = GenericsUtils.resolveClass(type);
                if (addClass.isAssignableFrom(typeClass)) {
                    if (TypeUtils.isMoreSpecific(add, type)) {
                        // replace
                        it.remove();
                    } else {
                        // more specific type already contained
                        additionApproved = false;
                    }
                    break;
                }
            }
            if (additionApproved) {
                types.add(add);
            }
        }
    }
138655
public ElementsBuilder addAll(IsElement... elements) {
        for (IsElement element : elements) {
            add(element);
        }
        return that();
    }
893959
public function add($element, $postion=null, $type=null) {
		parent::add($element, $postion, $type);
	}
612616
private static void addTypeToList(Type type, List<Type> typeList) {
        if (type instanceof ParameterizedType) {
            ParameterizedType parameterizedType = (ParameterizedType) type;
            addTypeToList(parameterizedType.getRawType(), typeList);
            for (Type actualTypeArgument : parameterizedType.getActualTypeArguments()) {
                addTypeToList(actualTypeArgument, typeList);
            }
        } else {
            typeList.add(type);
        }
    }
928601
@Override
	public boolean addAll(Collection<? extends Integer> c) {
		Iterator<? extends Integer> iter=c.iterator();
		boolean didOne=false;
		while(iter.hasNext()) {
			add(iter.next().intValue());
			didOne=true;
		}
		return didOne;
	}
1300828
@SafeVarargs
    public final void addAll(E... elements) {
        if (elements == null) throw new NullPointerException();
        addAll(Arrays.asList(elements));
    }
1131614
public BeanBuilder<T> addTypes(Type... types) {
        this.types.addAll(Arrays2.asSet(types));
        return this;
    }
531634
@Override
    public boolean add(T e) {
        if (elements.add(e)) {
            ordered.add(e);
            return true;
        } else {
            return false;
        }
    }
680256
private void addDescendantElements() throws NodeSelectorException {
        for (Node node : nodes) {
            List<Node> nl;
            if (node instanceof Document || node instanceof Element) {
                nl = DOMHelper.getElementsByTagName(node, selector.getTagName());
            } else {
                throw new NodeSelectorException("Only document and element nodes allowed!");
            }
            
            result.addAll(nl);
        }
    }
1302002
@SafeVarargs
  /* #end */
  public final void addLast(KType... elements) {
    ensureBufferSpace(1);
    for (KType k : elements) {
      addLast(k);
    }
  }
1144946
public boolean addOptionalParams(JSType ...types) {
    if (hasVarArgs()) {
      return false;
    }

    for (JSType type : types) {
      newParameter(registry.createOptionalType(type)).setOptionalArg(true);
    }
    return true;
  }
1175306
public void addSubtype(String subtype) {
    if(!StringUtils.isBlank(subtype) && !subtypes.contains(subtype.trim())) {
      subtypes.add(subtype.trim());
    }
  }
845521
public void addSelections(Class<?> selectionType) {
		List<Field> fields = JpaHelper.listFields(selectionType);
		for (Field field : fields) {
			if (field.getName().equals("serialVersionUID"))
				continue;
			if (type != null && JpaHelper.findField(type, field.getName()) != null) {
				if (JpaHelper.findField(type, field.getName()).getType().equals(field.getType())) {
					this.selections.add(field.getName());
				}
			}
		}
	}
276953
private void addAdjacentSiblingElements() {
        for (Node node : nodes) {
            Node n = DOMHelper.getNextSiblingElement(node);
            if (n != null) {
                String tag = selector.getTagName();
                if (tagEquals(tag, DOMHelper.getNodeName(n)) || tag.equals(Selector.UNIVERSAL_TAG)) {
                    result.add(n);
                }
            }
        }
    }
646502
private void addTypes(Injector injector, List<Class<?>> types) {
        for (Binding<?> binding : injector.getBindings().values()) {
            Key<?> key = binding.getKey();
            Type type = key.getTypeLiteral().getType();
            if (hasAnnotatedMethods(type)) {
                types.add(((Class<?>)type));
            }
        }
        if (injector.getParent() != null) {
            addTypes(injector.getParent(), types);
        }
    }