public void validateResult(Losr losr) { aboveOrWithinRule.validate(losr); Instruction instruction = planner.instruction(losr); if (matchExpectedInstruction) { if (!instruction.equals(command.scene().instruction())) { throw new RoboticException("Failed to match expected instruction."); } } }
public void validatePartial(Losr losr) { if (losr instanceof Entity) { Entity e = (Entity) losr; if (e.spatialRelation() != null) { aboveOrWithinRule.validate(e, e.spatialRelation()); } } if (losr instanceof Location) { markerRule.validate(losr, tokens); } }