* @param newColour loaded from XML.
*/
public synchronized void AugmentPTA(computeStateScores pta, RestartLearningEnum ptaKind,
List<String> sequence, boolean accepted, JUConstants newColour) {
AugmentPTAData data = new AugmentPTAData(ptaKind,sequence,accepted,newColour);
// now call the expected method
if (Thread.currentThread() == secondThread)
{
whatToCompareWith.AugmentPTA(pta, ptaKind, sequence, accepted, newColour);
augmentData = data;
}
else
decoratedLearner.AugmentPTA(pta, ptaKind, sequence, accepted, newColour);
checkCall(KIND_OF_METHOD.M_AUGMENT);
if (Thread.currentThread() != secondThread)
{
if (!data.equals(augmentData)) // second thread, checking.
failureCode = new IllegalArgumentException("different augment PTA values");
augmentData=null;// reset stored data
}
checkCall(KIND_OF_METHOD.M_METHODEXIT);// aims to stop one of the threads running fast