edu.wpi.prc.templates.java.validator
Class ResultValidator

java.lang.Object
  extended by edu.wpi.prc.templates.java.validator.ResultValidator

public class ResultValidator
extends java.lang.Object

The ResultValidator class contains project-specific code used to validate work units and spot-checks, and to select the canonical result for a work unit.

Author:
James Baldassari

Constructor Summary
ResultValidator()
           
 
Method Summary
 java.lang.String selectCanonicalResult(java.util.Vector<Result> results)
          Selects a canonical result from a set of results.
 boolean validateSingleResult(Result r)
          Determines whether a single result was valid.
 boolean validateSpotCheck(SpotCheck check)
          Determines whether a spot-check was valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultValidator

public ResultValidator()
Method Detail

validateSingleResult

public boolean validateSingleResult(Result r)
Determines whether a single result was valid.

Parameters:
r - The result to validate.
Returns:
Returns true if the result is valid, false otherwise.

selectCanonicalResult

public java.lang.String selectCanonicalResult(java.util.Vector<Result> results)
Selects a canonical result from a set of results.

Parameters:
results - The set of valid results for a work unit.
Returns:
Returns the result ID of the canonical result that was selected.

validateSpotCheck

public boolean validateSpotCheck(SpotCheck check)
Determines whether a spot-check was valid.

Parameters:
check - The spot-check to validate.
Returns:
Returns true if the spot-check is valid, false otherwise.