private void signalRunStartToAllListeners() { FCollection.forEach(this.listeners, a -> a.runStart()); }
private void signalRunEndToAllListeners() { FCollection.forEach(this.listeners, a -> a.runEnd()); }
public void registerResults(final Collection<MutationResult> results) { FCollection.forEach(results, register()); }
public void setStatusForMutations( final Collection<MutationDetails> mutations, final DetectionStatus status) { FCollection.forEach(mutations, putToMap(this.mutationMap, MutationStatusTestPair.notAnalysed(0, status))); }
public void describeFeatures(SideEffect1<Feature> enabled, SideEffect1<Feature> disabled) { final FeatureParser parser = new FeatureParser(); final Collection<ProvidesFeature> available = new ArrayList<>(this.plugins.findInterceptors()); final List<FeatureSetting> settings = parser.parseFeatures(this.options.getFeatures()); final FeatureSelector<ProvidesFeature> selector = new FeatureSelector<>(settings, available); final HashSet<Feature> enabledFeatures = new HashSet<>(); FCollection.mapTo(selector.getActiveFeatures(), toFeature(), enabledFeatures); FCollection.forEach(enabledFeatures, enabled); final HashSet<Feature> disabledFeatures = new HashSet<>(); FCollection.mapTo(available, toFeature(), disabledFeatures); disabledFeatures.removeAll(enabledFeatures); FCollection.forEach(disabledFeatures, disabled); }
@Test public void shouldApplyForEachToAllItems() { final List<Integer> actual = new ArrayList<>(); final SideEffect1<Integer> e = a -> actual.add(a); FCollection.forEach(this.is, e); assertEquals(this.is, actual); }
@Override public void verify(final CodeSource code) { final Collection<ClassInfo> codeClasses = FCollection.filter(code.getCode(), isNotSynthetic()); if (hasMutableCode(codeClasses)) { checkAtLeastOneClassHasLineNumbers(codeClasses); FCollection.forEach(codeClasses, throwErrorIfHasNoSourceFile()); } }