<commit_before>package com.grayben.riskExtractor.headingMarker.elector;

import java.util.List;

import com.grayben.riskExtractor.headingMarker.nominator.NominatedText;

public class ElectedText

        extends
        NominatedText

        implements
	    ElecteesRetrievable {

    //TODO: make this a set: should not have repetitions
    List<Integer> electees;

    public ElectedText(List<String> textList, List<Integer> nominees, List<Integer> electees){
        super(textList, nominees);
        if (electees == null) {
            throw new NullPointerException("Attempted to pass illegal null argument");
        }
        this.electees = electees;
    }

    public ElectedText(NominatedText nominatedText, List<Integer> electees){
        super(nominatedText);
        if (electees == null) {
            throw new NullPointerException("Attempted to pass illegal null argument");
        }
        this.electees = electees;
    }

    public ElectedText(ElectedText electedText){
        this(electedText, electedText.getElectees());
    }

    @Override
    public List<Integer> getElectees() {
        // TODO Auto-generated method stub
        return this.electees;
    }

}<commit_msg>Make ElectedText immutable<commit_after>package com.grayben.riskExtractor.headingMarker.elector;

import java.util.Collections;
import java.util.List;

import com.grayben.riskExtractor.headingMarker.nominator.NominatedText;

public class ElectedText

        extends
        NominatedText

        implements
	    ElecteesRetrievable {

    //TODO: make this a set: should not have repetitions
    List<Integer> electees;

    public ElectedText(List<String> textList, List<Integer> nominees, List<Integer> electees){
        super(textList, nominees);
        if (electees == null) {
            throw new NullPointerException("Attempted to pass illegal null argument");
        }
        this.electees = electees;
    }

    public ElectedText(NominatedText nominatedText, List<Integer> electees){
        super(nominatedText);
        if (electees == null) {
            throw new NullPointerException("Attempted to pass illegal null argument");
        }
        this.electees = electees;
    }

    public ElectedText(ElectedText electedText){
        this(electedText, electedText.getElectees());
    }

    @Override
    public List<Integer> getElectees() {
        return Collections.unmodifiableList(this.electees);
    }

}
{'fraction_non_alphanumeric': 0.08579638752052546, 'fraction_numerical': 0.0, 'mean_word_length': 2.969055374592834, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '1376383', 'n_tokens_mistral': 700, 'n_tokens_neox': 664, 'n_words': 160}