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;
    }

}

@@ -51,16 +51,46 @@
 ector;%0A%0A
+import java.util.Collections;%0A
 import j
@@ -1130,58 +1130,44 @@
     
-// TODO Auto-generated method stub%0A        return 
+return Collections.unmodifiableList(
 this
@@ -1167,27 +1167,28 @@
 st(this.electees
+)
 ;%0A    %7D%0A%0A%7D%0A

Make ElectedText immutable