<commit_before>package com.hyprion.beckon;

import sun.misc.Signal;
import sun.misc.SignalHandler;

import java.util.List;

import java.util.concurrent.Callable;

public class SignalFolder implements SignalHandler {
    final private Callable[] fns;

    public SignalFolder(List funs) {
        fns = new Callable[funs.size()];
        for (int i = 0; i < fns.length; i++) {
            fns[i] = (Callable) funs.get(i);
        }
    }

    public void handle(Signal sig) {
        for (Callable c : fns) {
            boolean res = false;
            try {
                res = (Boolean) c.call(); // No input elems?
            }
            catch (Exception e) {}
            finally {
                if (!res) {
                    break;
                }
            }
        }<commit_msg>Allow caller to return any kind of value.<commit_after>package com.hyprion.beckon;

import sun.misc.Signal;
import sun.misc.SignalHandler;

import java.util.List;

import java.util.concurrent.Callable;

public class SignalFolder implements SignalHandler {
    final private Callable[] fns;

    public SignalFolder(List funs) {
        fns = new Callable[funs.size()];
        for (int i = 0; i < fns.length; i++) {
            fns[i] = (Callable) funs.get(i);
        }
    }

    public void handle(Signal sig) {
        for (Callable c : fns) {
            boolean cont = true;
            try {
                Object oRes = c.call();
                if (oRes == false || oRes == null) {
                    cont = false;
                }
            }
            catch (Exception e) {}
            finally {
                if (!cont) {
                    break;
                }
            }
        }
{'fraction_non_alphanumeric': 0.10753945061367622, 'fraction_numerical': 0.0011689070718877848, 'mean_word_length': 1.4668587896253602, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '2393946', 'n_tokens_mistral': 516, 'n_tokens_neox': 489, 'n_words': 131}