// Module    : $RCSfile: UsabilityEvaluationResult.java,v $
// Version   : $Revision: 0.0 $  $Author: pharms $  $Date: 16.07.2012 $
// Project   : UsabilityEvaluationManager
// Creation  : 2012 by pharms
// Copyright : Patrick Harms, 2012


package de.ugoe.cs.quest.usability;

import java.util.ArrayList;
import java.util.List;

/**
 * TODO comment
 * 
 * @version $Revision: $ $Date: 16.07.2012$
 * @author 2012, last modified by $Author: pharms$
 */
public class UsabilityEvaluationResult {
    
    /** */
    private List<UsabilityDefect> defects = new ArrayList<UsabilityDefect>();

    /**
     * TODO: comment
     * 
     * @param defect
     */
    public void addDefect(UsabilityDefect defect) {
        defects.add(defect);
    }

    /**
     * TODO: comment
     * 
     * @return
     */
    public List<UsabilityDefect> getAllDefects() {
        return defects;
    }

    /**
     * TODO: comment
     * 
     * @return
     */
    public List<UsabilityDefect> getSevereDefects() {
        List<UsabilityDefect> severeDefects = new ArrayList<UsabilityDefect>();

        for (UsabilityDefect defect : defects) {
            if (defect.getSeverity() == UsabilityDefectSeverity.HIGH) {
                severeDefects.add(defect);
            }
        }

        return severeDefects;
    }

}
