<commit_before>package com.github.kubatatami.judonetworking.callbacks;

import com.github.kubatatami.judonetworking.AsyncResult;
import com.github.kubatatami.judonetworking.CacheInfo;
import com.github.kubatatami.judonetworking.exceptions.JudoException;
import com.github.kubatatami.judonetworking.stateful.StatefulCache;

/**
 * Created with IntelliJ IDEA.
 * User: jbogacki
 * Date: 07.01.2013
 * Time: 10:55
 */
public interface Callback<T> extends BaseCallback<T> {

    void onStart(CacheInfo cacheInfo, AsyncResult asyncResult);

    @SuppressWarnings("unchecked")
    class Builder<T, Z extends Builder<T, ?>> {

        BinaryOperator<T> onSuccess;

        DualOperator<T, AsyncResult> onSuccessWithAsyncResult;

        BinaryOperator<JudoException> onError;

        BinaryOperator<Integer> onProgress;

        DualOperator<CacheInfo, AsyncResult> onStart;

        VoidOperator onFinish;

        BinaryOperator<AsyncResult> onFinishWithAsyncResult;

        private Builder() {
        }
<commit_msg>generic builder<commit_after>package com.github.kubatatami.judonetworking.callbacks;

import com.github.kubatatami.judonetworking.AsyncResult;
import com.github.kubatatami.judonetworking.CacheInfo;
import com.github.kubatatami.judonetworking.exceptions.JudoException;
import com.github.kubatatami.judonetworking.stateful.StatefulCache;

/**
 * Created with IntelliJ IDEA.
 * User: jbogacki
 * Date: 07.01.2013
 * Time: 10:55
 */
public interface Callback<T> extends BaseCallback<T> {

    void onStart(CacheInfo cacheInfo, AsyncResult asyncResult);

    @SuppressWarnings("unchecked")
    class Builder<T, Z extends Builder<T, ?>> {

        BinaryOperator<T> onSuccess;

        DualOperator<T, AsyncResult> onSuccessWithAsyncResult;

        BinaryOperator<JudoException> onError;

        BinaryOperator<Integer> onProgress;

        DualOperator<CacheInfo, AsyncResult> onStart;

        VoidOperator onFinish;

        BinaryOperator<AsyncResult> onFinishWithAsyncResult;

        public Builder() {
        }

{'fraction_non_alphanumeric': 0.09167077378018729, 'fraction_numerical': 0.011828486939379004, 'mean_word_length': 4.231958762886598, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '3231471', 'n_tokens_mistral': 670, 'n_tokens_neox': 611, 'n_words': 109}