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

java.lang.Object
  extended by edu.wpi.prc.example.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

Field Summary
private static int SIZEOF_INT
           
 
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)
          Validates a single result.
 boolean validateSpotCheck(SpotCheck check)
          Validates a spot-check.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIZEOF_INT

private static final int SIZEOF_INT
See Also:
Constant Field Values
Constructor Detail

ResultValidator

public ResultValidator()
Method Detail

validateSingleResult

public boolean validateSingleResult(Result r)
Validates a single result.

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)
Validates a spot-check.

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