src/org/ohmage/validator/UserValidators.java
public static int validateNumToSkip(final String value) 
			throws ValidationException {
		
		LOGGER.info("Validating that a number of users to skip is valid.");
		
		if(StringUtils.isEmptyOrWhitespaceOnly(value)) {
			return 0;
		}
		
		try {
			int numToSkip = Integer.decode(value);
			
			if(numToSkip < 0) {
				throw new ValidationException(
						ErrorCode.SERVER_INVALID_NUM_TO_SKIP,
						"The number of users to skip is negative.");
			}
			
			return numToSkip;
		}
		catch(NumberFormatException e) {
			throw new ValidationException(
					ErrorCode.SERVER_INVALID_NUM_TO_SKIP,
					"The number of users to skip is not a number: " +
							value);
		}
	}
/**
	 * Validates that a number of users to skip is a non-negative number.
	 * 
	 * @param value The value to validate.
	 * 
	 * @return The validated number of users to skip.
	 * 
	 * @throws ValidationException There was a problem decoding the number.
	 */
Validates that a number of users to skip is a non-negative number.

@param value The value to validate.

@return The validated number of users to skip.

@throws ValidationException There was a problem decoding the number.
Validates that a number of users to skip is a non - negative number . @param value The value to validate . @return The validated number of users to skip . @throws ValidationException There was a problem decoding the number .
public static int validateNumToSkip(final String value) 
			throws ValidationException {
		LOGGER.info("Validating that a number of users to skip is valid.");
		if(StringUtils.isEmptyOrWhitespaceOnly(value)) {
			return 0;
		}
		try {
			int numToSkip = Integer.decode(value);
			if(numToSkip < 0) {
				throw new ValidationException(
						ErrorCode.SERVER_INVALID_NUM_TO_SKIP,
						"The number of users to skip is negative.");
			}
			return numToSkip;
		}
		catch(NumberFormatException e) {
			throw new ValidationException(
					ErrorCode.SERVER_INVALID_NUM_TO_SKIP,
					"The number of users to skip is not a number: " +
							value);
		}
	}
public static int validateNumToSkip ( final String value ) throws ValidationException { LOGGER . info ( "Validating that a number of users to skip is valid." ) ; if ( StringUtils . isEmptyOrWhitespaceOnly ( value ) ) { return 0 ; } try { int numToSkip = Integer . decode ( value ) ; if ( numToSkip < 0 ) { throw new ValidationException ( ErrorCode . SERVER_INVALID_NUM_TO_SKIP , "The number of users to skip is negative." ) ; } return numToSkip ; } catch ( NumberFormatException e ) { throw new ValidationException ( ErrorCode . SERVER_INVALID_NUM_TO_SKIP , "The number of users to skip is not a number: " + value ) ; } }
Validates that a number of users to skip is a non-negative number.
Validates that a number of users to skip is a non - negative number .