<commit_before>package com.flash3388.flashlib.vision;

import com.castle.concurrent.service.PeriodicTaskService;
import com.castle.concurrent.service.Service;
import org.slf4j.Logger;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;

public class ImageDelegator<T extends Image> {

    private final ImageSource<? extends T> mImageSource;
    private final Collection<ImagePipeline<? super T>> mImagePipelines;

    public ImageDelegator(ImageSource<? extends T> imageSource, Collection<ImagePipeline<? super T>> imagePipelines) {
        mImageSource = imageSource;
        mImagePipelines = new ArrayList<>(imagePipelines);
    }

    @SafeVarargs
    public ImageDelegator(ImageSource<? extends T> imageSource, ImagePipeline<? super T>... imagePipelines) {
        this(imageSource, Arrays.asList(imagePipelines));
    }

    public void delegate() throws VisionException {
        T image = mImageSource.get();

        for (ImagePipeline<? super T> pipeline : mImagePipelines) {
            pipeline.process(image);
        }
    }

    private static class ImageDelegationTask<T extends Image> implements Runnable {

        private final ImageDelegator<T> mImageDelegator;
        private final Logger mLogger;

        private ImageDelegationTask(ImageDelegator<T> imageDelegator, Logger logger) {
            mImageDelegator = imageDelegator;
            mLogger = logger;
        }

        @Override
        public void run() {
            try {
                mImageDelegator.delegate();
            } catch (VisionException e) {
                mLogger.error("error in image delegation", e);
            }
        }
    }
}<commit_msg>removed some inner class thing<commit_after>package com.flash3388.flashlib.vision;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;

public class ImageDelegator<T extends Image> {

    private final ImageSource<? extends T> mImageSource;
    private final Collection<ImagePipeline<? super T>> mImagePipelines;

    public ImageDelegator(ImageSource<? extends T> imageSource, Collection<ImagePipeline<? super T>> imagePipelines) {
        mImageSource = imageSource;
        mImagePipelines = new ArrayList<>(imagePipelines);
    }

    @SafeVarargs
    public ImageDelegator(ImageSource<? extends T> imageSource, ImagePipeline<? super T>... imagePipelines) {
        this(imageSource, Arrays.asList(imagePipelines));
    }

    public void delegate() throws VisionException {
        T image = mImageSource.get();

        for (ImagePipeline<? super T> pipeline : mImagePipelines) {
            pipeline.process(image);
        }
    }
}
{'fraction_non_alphanumeric': 0.09118311981914091, 'fraction_numerical': 0.003391107761868877, 'mean_word_length': 3.220985691573927, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7664107', 'n_tokens_mistral': 743, 'n_tokens_neox': 726, 'n_words': 181}