This is like retain all except it returns a list of what was removed.

TODO remove the bundles.

@param newBundleList
@return
549512
public BundleList findExtraBundles(BundleList newBundleList, FeatureManager featureManager) {
        List<RuntimeFeatureResource> bundles = new ArrayList<RuntimeFeatureResource>(resources);
        bundles.removeAll(newBundleList.resources);
        resources.removeAll(bundles);
        BundleList result = new BundleList(featureManager);
        result.resources.addAll(bundles);
        stale.set(true);
        return result;
    }
780394
private void unregister( final Bundle bundle )
    {
    	if (bundle == null)
    		return; // no need to go any further, system probably stopped. 
        LOG.debug( "Releasing bundle [" + bundle.getSymbolicName() + "]" );
        final List<T> resources = m_mappings.get( bundle );
        if( resources != null && resources.size() > 0 )
        {
            LOG.debug( "Un-registering " + resources );
            for( BundleObserver<T> observer : m_observers )
            {
                try
                {
                    observer.removingEntries( bundle, Collections.unmodifiableList( resources ) );
                }
                catch( Throwable ignore )
                {
                    LOG.error( "Ignored exception during un-register", ignore );
                }
            }
        }
        m_mappings.remove( bundle );
    }
406272
public void registerLookupBundles(final List<GuiceyBundle> bundles) {
        setScope(ConfigScope.BundleLookup.getType());
        for (GuiceyBundle bundle : bundles) {
            register(ConfigItem.Bundle, bundle);
        }
        closeScope();
        lifecycle().bundlesFromLookupResolved(bundles);
        lifecycle().bundlesResolved(getEnabledBundles(), getDisabledBundles());
    }
261853
def unused_by(self, bundle):
        
        if bundle is None or bundle is self.__bundle:
            # Ignore
            return

        with self.__usage_lock:
            try:
                if not self.__using_bundles[bundle].dec():
                    # This bundle has cleaner all of its usages of this
                    # reference
                    del self.__using_bundles[bundle]
            except KeyError:
                # Ignore error
                pass
134709
@SuppressWarnings("unchecked")
    public boolean removeList(@NonNull ObservableList<? extends T> listToRemove) {
        int size = 0;
        for (int i = 0, listsSize = lists.size(); i < listsSize; i++) {
            List<? extends T> list = lists.get(i);
            if (list == listToRemove) {
                listToRemove.removeOnListChangedCallback(callback);
                lists.remove(i);
                modCount += 1;
                listeners.notifyRemoved(this, size, list.size());
                return true;
            }
            size += list.size();
        }
        return false;
    }
332728
public WordNumberCollectorBundle mergeAll(
            List<WordNumberCollectorBundle> wordNumberCollectorList) {
        for (WordNumberCollectorBundle wordNumberCollector : wordNumberCollectorList)
            merge(wordNumberCollector);
        return this;
    }


    /**
     * Gets word collector.
     *
     * @return the word collector
     */
    public WordItemCollector getWordCollector() {return this.wordCollector;}

    /**
     * Gets number collector.
     *
     * @return the number collector
     */
    public NumberItemCollector getNumberCollector() {return this.numberCollector;}

    @Override
    public String toString() {
        return "WordNumberCollectorBundle{" + "collectorId='" + collectorId +
                '\'' + ", wordCollector=" + wordCollector +
                ", numberCollector=" + numberCollector + '}';
    }
}
100973
@Override
    public Collection<ResourceBundle> bundles(Locale locale) {
        Set<ResourceBundle> bundles = new LinkedHashSet<>();
        for (I18nExtension extension : extensions) {
            if (extension.locale().equals(locale)) {
                bundles.add(extension.bundle());
            }
        }
        return bundles;
    }
778734
@Pure
	public List<Object> getRemovedValues() {
		if (this.oldValues == null) {
			return Collections.emptyList();
		}
		return Collections.unmodifiableList(this.oldValues);
	}
965901
public List<String> getDirtyBundleNames() {

		List<String> bundleNames = new ArrayList<>();
		if (bundlesHandler != null) {
			bundleNames = bundlesHandler.getDirtyBundleNames();
		}

		return bundleNames;
	}
96724
protected function doGetBundles() {
		$cache = $this->getCache();
		if($cache)
			$bundles = $cache->fetch('asgard.bundles');

		if(!isset($bundles) || $bundles === false) {
			$bundles = array_merge($this->addedBundles, $this->getBundles());

			$newBundles = false;
			foreach($bundles as $k=>$v) {
				if(is_string($v)) {
					$bundle = realpath($v);
					if(!$bundle)
						throw new \Exception('Bundle '.$v.' does not exist.');
					unset($bundles[$k]);
					$bundles[$bundle] = null;
					$newBundles = true;

					if(file_exists($bundle.'/Bundle.php'))
						require_once $bundle.'/Bundle.php';
				}
			}
			if($newBundles) {
				foreach(get_declared_classes() as $class) {
					if(!is_subclass_of($class, 'Asgard\Core\BundleLoader'))
						continue;
					$reflector = new \ReflectionClass($class);
					$dir = dirname($reflector->getFileName());
					if(array_key_exists($dir, $bundles) && $bundles[$dir] === null) {
						unset($bundles[$dir]);
						$bundles[] = new $class;
					}
				}
			}
			foreach($bundles as $bundle=>$obj) {
				if($obj === null) {
					$obj = new BundleLoader;
					$obj->setPath($bundle);
					$bundles[$bundle] = $obj;
				}
			}

			#Remove duplicates
			$kbundles = array_keys($bundles);
			$vbundles = array_values($bundles);
			foreach($vbundles as $k=>$b) {
				$key = $kbundles[$k];
				for($i=$k+1; isset($bundles[$i]); $i++) {
					if($b->getPath() === $bundles[$i]->getPath())
						unset($bundles[$k]);
				}
			}

			foreach($bundles as $bundle) {
				$bundle->setHooksAnnotationReader($this->getHooksAnnotationReader());
				$bundle->setControllersAnnotationReader($this->getControllersAnnotationReader());
			}

			if($cache)
				$cache->save('asgard.bundles', $bundles);
		}

		return $bundles;
	}
1147156
public List<String> getSuggestedReplacements() {
    List<String> l = new ArrayList<>();
    for (SuggestedReplacement repl : suggestedReplacements) {
      l.add(repl.getReplacement());
    }
    return Collections.unmodifiableList(l);
  }
545018
@Override
	public List<String> getDirtyBundleNames() {

		List<String> bundleNames = new ArrayList<>();
		List<JoinableResourceBundle> bundlesToRebuild = getBundlesToRebuild();
		for (JoinableResourceBundle bundle : bundlesToRebuild) {
			bundleNames.add(bundle.getName());
		}
		return bundleNames;
	}
864313
@Indexable(type = IndexableType.DELETE)
	@Override
	public CommerceWishList deleteCommerceWishList(
		CommerceWishList commerceWishList) {
		return commerceWishListPersistence.remove(commerceWishList);
	}
534264
public List<String> getCustomBundlePropertyAsList(String bundleName, String key) {
		List<String> propertiesList = new ArrayList<>();
		StringTokenizer tk = new StringTokenizer(getCustomBundleProperty(bundleName, key, ""), ",");
		while (tk.hasMoreTokens())
			propertiesList.add(tk.nextToken().trim());
		return propertiesList;
	}
858728
public GetListOfFeaturedPlaylistsRequest.Builder getListOfFeaturedPlaylists() {
    return new GetListOfFeaturedPlaylistsRequest.Builder(accessToken)
            .setDefaults(httpManager, scheme, host, port);
  }
465699
public static List<Bundle> getBundles( BundleContext bc, String symbolicName )
    {
        List<Bundle> bundles = new ArrayList<Bundle>();
        for( Bundle bundle : bc.getBundles() )
        {
            if( bundle.getSymbolicName().equals( symbolicName ) )
            {
                bundles.add( bundle );
            }
        }
        return bundles;
    }
414852
private JoinableResourceBundle getBundleFromName(String bundleName, List<JoinableResourceBundle> bundles) {

		JoinableResourceBundle bundle = null;
		List<String> names = new ArrayList<>();
		names.add(bundleName);
		List<JoinableResourceBundle> result = getBundlesFromName(names, bundles);
		if (!result.isEmpty()) {
			bundle = result.get(0);
		}
		return bundle;
	}