<commit_before>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package bd.ac.seu.advancedjavalab;

import java.util.ArrayList;

/**
 *
 * @author kmhasan
 */
public class Task1 {
    ?? subset ??
    
    public <T> void print(ArrayList<T> data) {
        for (T t: data)
            System.out.println(t);
    }
    
    public Task1() {
        ArrayList<String> cricketers = new ArrayList<>();
        cricketers.add("Mashrafi");
        cricketers.add("Sabbir");
        cricketers.add("Nasir");
        cricketers.add("Mushfiq");
        cricketers.add("Mustafiz");
        cricketers.add("Rubel");
        cricketers.add("Tamim");
        print(subset(cricketers, ??));
        //print(cricketers);
    }
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        new Task1();
    }
    
}
<commit_msg>Task 1 full solution. You only need to call subset and print for the Integer Pair test.<commit_after>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package bd.ac.seu.advancedjavalab;

import java.util.ArrayList;
import java.util.function.Predicate;

/**
 *
 * @author kmhasan
 */
public class Task1 {
    public <T> ArrayList<T> subset(ArrayList<T> data, Predicate<T> tester) {
        ArrayList<T> sub = new ArrayList<>();
        for (T t: data)
            if (tester.test(t))
                sub.add(t);
        return sub;
    }
    
    public <T> void print(ArrayList<T> data) {
        for (T t: data)
            System.out.println(t);
    }
    
    public Task1() {
        ArrayList<String> cricketers = new ArrayList<>();
        cricketers.add("Mashrafi");
        cricketers.add("Sabbir");
        cricketers.add("Nasir");
        cricketers.add("Mushfiq");
        cricketers.add("Mustafiz");
        cricketers.add("Rubel");
        cricketers.add("Tamim");
        print(subset(cricketers, p -> p.length() == 5));
        //print(cricketers);
    }
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        new Task1();
    }
    
}

{'fraction_non_alphanumeric': 0.13250958670643376, 'fraction_numerical': 0.0034086067319982955, 'mean_word_length': 2.3447293447293447, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 18, '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': '925524', 'n_tokens_mistral': 737, 'n_tokens_neox': 725, 'n_words': 190}