<commit_before>package gae.gameView;

import java.util.ArrayList;
import java.util.List;
import engine.gameobject.labels.Label;
import engine.gameobject.labels.SimpleLabel;
import gae.backend.Placeable;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

/**
 * Checklist for labels
 * 
 * @author <NAME>
 */
public class LabelCheckList extends CheckList {

    private List<Label> myObjects;

    public LabelCheckList (List<Label> objects) {
        super();
        myObjects = objects;

        // FOR TESTING ONLY, CALLED IN INTERACTION INSTANCE
        List<Label> list = new ArrayList<>();
        list.add(new SimpleLabel("heyyyy"));
        list.add(new SimpleLabel("nooooo"));
        myObjects = list;
        /////////

        myObjects.forEach(e -> {
            createCheckOption(new LabelCheckListItem(e));
        });
    }

    /**
     * Called by outside class to display the check list
     */
    public void showCheckList () {
        Stage temp = new Stage();
        Scene scene = new Scene((Parent) getCheckList());
        temp.setScene(scene);
        temp.show();
        temp.centerOnScreen();
    }

    /**
     * Returns the list of labels that has been selected in the checklist
     *
     * @return      list of labels
     */
    public List<Label> getSelectedLabels () {
        List<Label> list = new ArrayList<>();
        getSelectedItems().stream().forEach(e -> list.add(((LabelCheckListItem) e).getLabel()));
        return list;

    }

}<commit_msg>edited labelchecklist<commit_after>package gae.gameView;

import java.util.ArrayList;
import java.util.List;
import engine.gameobject.labels.Label;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;


/**
 * Checklist for labels
 * 
 * @author <NAME>
 */
public class LabelCheckList extends CheckList {

    private List<Label> myObjects;

    public LabelCheckList (List<Label> objects) {
        super();
        myObjects = objects;
        myObjects.forEach(e -> {
            createCheckOption(new LabelCheckListItem(e));
        });
    }

    /**
     * Called by outside class to display the check list
     */
    public void showCheckList () {
        Stage temp = new Stage();
        Scene scene = new Scene((Parent) getCheckList());
        temp.setScene(scene);
        temp.show();
        temp.centerOnScreen();
    }

    /**
     * Returns the list of labels that has been selected in the checklist
     *
     * @return list of labels
     */
    public List<Label> getSelectedLabels () {
        List<Label> list = new ArrayList<>();
        getSelectedItems().stream().forEach(e -> list.add(((LabelCheckListItem) e).getLabel()));
        return list;

    }

}
{'fraction_non_alphanumeric': 0.12093533065400074, 'fraction_numerical': 0.0, 'mean_word_length': 2.5420439844760674, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 21, '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': '6523349', 'n_tokens_mistral': 784, 'n_tokens_neox': 753, 'n_words': 200}