src/org/ohmage/domain/campaign/prompt/ChoicePrompt.java
@Override
	public void validateConditionValuePair(
			final ConditionValuePair pair)
			throws DomainException {
		
		try {
			int key = Integer.decode(pair.getValue());
			
			if(! choices.containsKey(key)) {
				throw new DomainException(
						"The value for a condition is not a valid key for this choice prompt: " +
							key);
			}
		}
		catch(NumberFormatException e) {
			throw new DomainException(
					"The value of the condition is not a number: " + 
						pair.getValue(),
					e);
		}
	}
/**
	 * Validates that a given condition-value pair's value is a valid key for
	 * this prompt.
	 * 
	 * @param pair The condition-value pair to validate.
	 * 
	 * @throws DomainException The value of the condition-value pair is not 
	 * 						   valid.
	 */
Validates that a given condition-value pair's value is a valid key for
this prompt.

@param pair The condition-value pair to validate.

@throws DomainException The value of the condition-value pair is not
valid.
Validates that a given condition - value pair ' s value is a valid key for this prompt . @param pair The condition - value pair to validate . @throws DomainException The value of the condition - value pair is not valid .
@Override
	public void validateConditionValuePair(
			final ConditionValuePair pair)
			throws DomainException {
		try {
			int key = Integer.decode(pair.getValue());
			if(! choices.containsKey(key)) {
				throw new DomainException(
						"The value for a condition is not a valid key for this choice prompt: " +
							key);
			}
		}
		catch(NumberFormatException e) {
			throw new DomainException(
					"The value of the condition is not a number: " + 
						pair.getValue(),
					e);
		}
	}
@ Override public void validateConditionValuePair ( final ConditionValuePair pair ) throws DomainException { try { int key = Integer . decode ( pair . getValue ( ) ) ; if ( ! choices . containsKey ( key ) ) { throw new DomainException ( "The value for a condition is not a valid key for this choice prompt: " + key ) ; } } catch ( NumberFormatException e ) { throw new DomainException ( "The value of the condition is not a number: " + pair . getValue ( ) , e ) ; } }
Validates that a given condition-value pair's value is a valid key for
 this prompt.
Validates that a given condition - value pair ' s value is a valid key for this prompt .