RetrieverForReddit/src/main/java/com/kdepagter/processor/RedditRequestValidator.java
/**
	 * Validates SubredditItems returned for final return to web service response
	 * Adds Reddit responses that were completed successfully, adds error for Reddit responses not returned successfully
	 * @param subredditResponse
	 * @param subredditNameList
	 * @return
	 */
Validates SubredditItems returned for final return to web service response
Adds Reddit responses that were completed successfully, adds error for Reddit responses not returned successfully
@param subredditResponse
@param subredditNameList
@return
Validates SubredditItems returned for final return to web service response Adds Reddit responses that were completed successfully adds error for Reddit responses not returned successfully @param subredditResponse @param subredditNameList @return
public List<SubredditItem> validateSubredditThreadResponses(Map<String, SubredditItem> subredditResponse, List<String> subredditNameList){
		List<SubredditItem> responseList = new ArrayList<SubredditItem>();
		for(int i=0; i<subredditNameList.size(); i++){
			String currentSubreddit = subredditNameList.get(i);
			SubredditItem si = subredditResponse.get(currentSubreddit);
			if(si != null){
				responseList.add(si);
			} else {
				responseList.add(createErrorItem("Response for " + currentSubreddit + " was not returned successfully."));
			}
		}
		return responseList;
	}
public List < SubredditItem > validateSubredditThreadResponses ( Map < String , SubredditItem > subredditResponse , List < String > subredditNameList ) { List < SubredditItem > responseList = new ArrayList < SubredditItem > ( ) ; for ( int i = 0 ; i < subredditNameList . size ( ) ; i ++ ) { String currentSubreddit = subredditNameList . get ( i ) ; SubredditItem si = subredditResponse . get ( currentSubreddit ) ; if ( si != null ) { responseList . add ( si ) ; } else { responseList . add ( createErrorItem ( "Response for " + currentSubreddit + " was not returned successfully." ) ) ; } } return responseList ; }
Validates SubredditItems returned for final return to web service response
 Adds Reddit responses that were completed successfully, adds error for Reddit responses not returned successfully
 @param subredditResponse
 @param subredditNameList
 @return
Validates SubredditItems returned for final return to web service response Adds Reddit responses that were completed successfully adds error for Reddit responses not returned successfully @param subredditResponse @param subredditNameList @return