Adds an extended interface (for interface only).
Returns whether the type was added.
if the type was already present in the list, it won't get added again.
540150
boolean addExtendedInterface(JSTypeExpression type) {
    lazyInitInfo();
    if (info.extendedInterfaces == null) {
      info.extendedInterfaces = new ArrayList<>(2);
    }
    if (info.extendedInterfaces.contains(type)) {
      return false;
    }
    info.extendedInterfaces.add(type);
    return true;
  }
1064201
@Override
  public Context addExtension(Context moreSpecific) throws KbTypeException, CreateException {
    return wrapped().addExtension(moreSpecific);
  }
712171
public void addInterface(Class<?> ifc) {

        LettuceAssert.notNull(ifc, "Interface type must not be null");
        LettuceAssert.isTrue(ifc.isInterface(), "Type must be an interface");

        this.interfaces.add(ifc);
    }
289703
private void addLastOfType() {
		for (Node node : nodes) {
			Index index = helper.getIndexInParent(node, true);
			if (index.index == (index.size-1))
				result.add(node);
		}
	}
449104
public void addInterface(String interfaceName) {
        if (!mInterfaceSet.contains(interfaceName)) {
            mInterfaces.add(mCp.addConstantClass(interfaceName));
            mInterfaceSet.add(interfaceName);
        }
    }
434891
private void addDirectSubTypes(XClass type, ArrayList subTypes)
    {
        if (type.isInterface())
        {
            if (type.getExtendingInterfaces() != null)
            {
                subTypes.addAll(type.getExtendingInterfaces());
            }
            // we have to traverse the implementing classes as these array contains all classes that
            // implement the interface, not only those who have an "implement" declaration
            // note that for whatever reason the declared interfaces are not exported via the XClass interface
            // so we have to get them via the underlying class which is hopefully a subclass of AbstractClass
            if (type.getImplementingClasses() != null)
            {
                Collection declaredInterfaces = null;
                XClass     subType;

                for (Iterator it = type.getImplementingClasses().iterator(); it.hasNext(); )
                {
                    subType = (XClass)it.next();
                    if (subType instanceof AbstractClass)
                    {
                        declaredInterfaces = ((AbstractClass)subType).getDeclaredInterfaces();
                        if ((declaredInterfaces != null) && declaredInterfaces.contains(type))
                        {
                            subTypes.add(subType);
                        }
                    }
                    else
                    {
                        // Otherwise we have to live with the bug
                        subTypes.add(subType);
                    }
                }
            }
        }
        else
        {
            subTypes.addAll(type.getDirectSubclasses());
        }
    }
1134424
static Collection<AbstractType> asList( Component extendedComponent ) {

		Collection<AbstractType> result;
		if( extendedComponent == null ) {
			result = new ArrayList<AbstractType>( 0 );

		} else {
			result = new ArrayList<AbstractType>( 1 );
			result.add( extendedComponent );
		}

		return result;
	}
240233
private void addSubManagedType(ManagedType inheritedType)
    {

        if (Modifier.isAbstract(this.getJavaType().getModifiers()))
        {
            subManagedTypes.add(inheritedType);
        }
    }
1040692
public void addExtends(String superType) {
		if (!Strings.isEmpty(superType)) {
			JvmParameterizedTypeReference superTypeRef = newTypeRef(this.container, superType);
			this.sarlInterface.getExtends().add(superTypeRef);
			return;
		}
	}
300635
@Override
    @Deprecated
    public boolean add(T t) {
        try {
            return addSync(t);
        } finally {
            if(extensions!=null) {
                fireOnChangeListeners();
            }
        }
    }
1185099
public boolean add(TypedEdge<T> e) {
        if (e.from() == rootVertex) 
            return add(edges, e.to(), e.edgeType());
        else if (e.to() == rootVertex) 
            return add(edges, e.from(), e.edgeType());
        return false;
    }
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);
            }
        }
    }
458061
private void addTypeInternal(AbstractTypeDefinition type) {

        if (type == null) {
            return;
        }

        if (m_types.containsKey(type.getId())) {
            // can't overwrite a type
            return;
        }

        TypeDefinitionContainerImpl tc = new TypeDefinitionContainerImpl();
        tc.setTypeDefinition(type);

        // add to parent
        if (type.getParentTypeId() != null) {
            TypeDefinitionContainerImpl tdc = m_types.get(type.getParentTypeId());
            if (tdc != null) {
                if (tdc.getChildren() == null) {
                    tdc.setChildren(new ArrayList<TypeDefinitionContainer>());
                }
                tdc.getChildren().add(tc);
            }
        }

        m_types.put(type.getId(), tc);
        m_typeList.add(tc);
    }
357113
def append(cls, interceptor):
        
        cls._check(interceptor)
        cls._interceptors.append(interceptor)
184123
public int addAll(KTypeContainer<? extends KType> container) {
    ensureCapacity(container.size());
    return addAll((Iterable<? extends KTypeCursor<? extends KType>>) container);
  }
299306
static <E> boolean addAllImpl(Multiset<E> self, Collection<? extends E> elements) {
    if (elements.isEmpty()) {
      return false;
    }
    if (elements instanceof Multiset) {
      Multiset<? extends E> that = cast(elements);
      for (Entry<? extends E> entry : that.entrySet()) {
        self.add(entry.getElement(), entry.getCount());
      }
    } else {
      Iterators.addAll(self, elements.iterator());
    }
    return true;
  }
904728
def add_implemented_interfaces(cls, interfaces):
    
    implemented = set(
        six.moves.reduce(
            lambda x, y: x.union(y),
            map(operator.attrgetter('implied'), interfaces),
            set()
        )
    )
    implemented.update(*map(
        get_implemented_interfaces,
        inspect.getmro(cls)
    ))
    setattr(cls, '__interfaces__', frozenset(implemented))