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 ; }
This is like retain all except it returns a list of what was removed .