src/org/ohmage/validator/ClassValidators.java
public static int validateNumToSkip(
			final String value) 
			throws ValidationException {
		
		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 classes to skip is negative: " +
							value);
			}
			
			return numToSkip;
		}
		catch(NumberFormatException e) {
			throw new ValidationException(
					ErrorCode.SERVER_INVALID_NUM_TO_SKIP,
					"The number of classes to skip is not a number: " +
							value);
		}
	}
/**
	 * Validates that the number of classes to skip is a non-negative number.
	 * 
	 * @param value The value to validate.
	 *  
	 * @return The validated number of classes to skip.
	 * 
	 * @throws ValidationException There was a problem decoding the number or 
	 * 							   it was an invalid number.
	 */
Validates that the number of classes to skip is a non-negative number.

@param value The value to validate.

@return The validated number of classes to skip.

@throws ValidationException There was a problem decoding the number or
it was an invalid number.
Validates that the number of classes to skip is a non - negative number . @param value The value to validate . @return The validated number of classes to skip . @throws ValidationException There was a problem decoding the number or it was an invalid number .
public static int validateNumToSkip(
			final String value) 
			throws ValidationException {
		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 classes to skip is negative: " +
							value);
			}
			return numToSkip;
		}
		catch(NumberFormatException e) {
			throw new ValidationException(
					ErrorCode.SERVER_INVALID_NUM_TO_SKIP,
					"The number of classes to skip is not a number: " +
							value);
		}
	}
public static int validateNumToSkip ( final String value ) throws ValidationException { 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 classes to skip is negative: " + value ) ; } return numToSkip ; } catch ( NumberFormatException e ) { throw new ValidationException ( ErrorCode . SERVER_INVALID_NUM_TO_SKIP , "The number of classes to skip is not a number: " + value ) ; } }
Validates that the number of classes to skip is a non-negative number.
Validates that the number of classes to skip is a non - negative number .