package com.grayben.riskExtractor.htmlScorer;

import java.util.HashMap;
import java.util.Map;

public class ScoredTextElement {
	private String textElement = null;
	Map<String, Integer> scores = new HashMap<String, Integer>(8, 0.5f);
	
	public ScoredTextElement(String text, Map<String, Integer> scores) {
		super();
		if(text == null){
			throw new NullPointerException(
					"Tried to pass in null text:String"
			);
		}
		if(scores == null){
			throw new NullPointerException(
					"Tried to pass in null scores:Map<Integer, Integer>"
			);
		}
		this.textElement = text;
		this.scores = scores;
	}
	
	public String getTextElement() {
		return textElement;
	}
	
	public Map<String, Integer> getScores() {
		return scores;
	}
	
}

@@ -417,16 +417,359 @@
 %09);%0A%09%09%7D%0A
+        if(text.equals(%22%22))%7B%0A            throw new IllegalArgumentException(%0A                    %22Tried to pass in empty String%22%0A            );%0A        %7D%0A        if(text.matches(%22%5E%5C%5Cs*$%22))%7B%0A            throw new IllegalArgumentException(%0A                    %22Tried to pass in string with no non-whitespace characters%22%0A            );%0A        %7D%0A
 %09%09if(sco
@@ -772,37 +772,47 @@
 (scores == null)
+ 
 %7B%0A
-%09%09%09
+            
 throw new NullPo
@@ -819,37 +819,52 @@
 interException(%0A
-%09%09%09%09%09
+                    
 %22Tried to pass i
@@ -900,19 +900,190 @@
 teger%3E%22%0A
-%09%09%09
+            );%0A        %7D%0A%09%09if(scores.isEmpty())%7B%0A%09%09%09throw new IllegalArgumentException(%0A                    %22Tried to pass in empty scores:Map%3CInteger, Integer%3E%22%0A            
 );%0A%09%09%7D%0A%09

Add argument checks