src/org/ohmage/validator/SurveyResponseValidators.java
public static Set<String> validatePromptIds(final String promptIds) 
			throws ValidationException {
		
		if(StringUtils.isEmptyOrWhitespaceOnly(promptIds)) {
			return null;
		}
		
		Set<String> result = new HashSet<String>();
		String[] promptIdsArray = promptIds.split(InputKeys.LIST_ITEM_SEPARATOR);
		
		for(int i = 0; i < promptIdsArray.length; i++) {
			String currPromptId = promptIdsArray[i].trim();
			
			if(! StringUtils.isEmptyOrWhitespaceOnly(currPromptId)) {
				result.add(currPromptId);
			}
		}
		
		return result;
	}
/**
	 * Validates a string representing a list of prompt response IDs.
	 * 
	 * @param promptIds The string list of prompt IDs.
	 * 
	 * @return A Set of unique prompt IDs.
	 */
Validates a string representing a list of prompt response IDs.

@param promptIds The string list of prompt IDs.

@return A Set of unique prompt IDs.
Validates a string representing a list of prompt response IDs . @param promptIds The string list of prompt IDs . @return A Set of unique prompt IDs .
public static Set<String> validatePromptIds(final String promptIds) 
			throws ValidationException {
		if(StringUtils.isEmptyOrWhitespaceOnly(promptIds)) {
			return null;
		}
		Set<String> result = new HashSet<String>();
		String[] promptIdsArray = promptIds.split(InputKeys.LIST_ITEM_SEPARATOR);
		for(int i = 0; i < promptIdsArray.length; i++) {
			String currPromptId = promptIdsArray[i].trim();
			if(! StringUtils.isEmptyOrWhitespaceOnly(currPromptId)) {
				result.add(currPromptId);
			}
		}
		return result;
	}
public static Set < String > validatePromptIds ( final String promptIds ) throws ValidationException { if ( StringUtils . isEmptyOrWhitespaceOnly ( promptIds ) ) { return null ; } Set < String > result = new HashSet < String > ( ) ; String [ ] promptIdsArray = promptIds . split ( InputKeys . LIST_ITEM_SEPARATOR ) ; for ( int i = 0 ; i < promptIdsArray . length ; i ++ ) { String currPromptId = promptIdsArray [ i ] . trim ( ) ; if ( ! StringUtils . isEmptyOrWhitespaceOnly ( currPromptId ) ) { result . add ( currPromptId ) ; } } return result ; }
Validates a string representing a list of prompt response IDs.
Validates a string representing a list of prompt response IDs .