src/org/ohmage/util/StringUtils.java
public static boolean isValidUuid(String uuid) {
		if(StringUtils.isEmptyOrWhitespaceOnly(uuid)) {
			return false;
		}
		
		try {
			UUID.fromString(uuid);
			
			return true;
		}
		catch(IllegalArgumentException e) {
			return false;
		}
	}
/**
	 * Validates that a UUID String is a valid UUID.
	 * 
	 * @param uuid The UUID as a String to validate.
	 * 
	 * @return Returns true if the String is not null, not whitespace only, and
	 * 		   is a valid UUID.
	 */
Validates that a UUID String is a valid UUID.

@param uuid The UUID as a String to validate.

@return Returns true if the String is not null, not whitespace only, and
is a valid UUID.
Validates that a UUID String is a valid UUID . @param uuid The UUID as a String to validate . @return Returns true if the String is not null not whitespace only and is a valid UUID .
public static boolean isValidUuid(String uuid) {
		if(StringUtils.isEmptyOrWhitespaceOnly(uuid)) {
			return false;
		}
		try {
			UUID.fromString(uuid);
			return true;
		}
		catch(IllegalArgumentException e) {
			return false;
		}
	}
public static boolean isValidUuid ( String uuid ) { if ( StringUtils . isEmptyOrWhitespaceOnly ( uuid ) ) { return false ; } try { UUID . fromString ( uuid ) ; return true ; } catch ( IllegalArgumentException e ) { return false ; } }
Validates that a UUID String is a valid UUID.
Validates that a UUID String is a valid UUID .