// A = tag type srecord noeq USwitchByBrightness(NavigableMap brightnessToValue) implements IIIRecognizer { public void run( IProbabilisticScheduler scheduler, IIntegralImage img, IVF1 valueToAction) { new ProbabilisticDistanceBasedLookup( scheduler, brightnessToValue, brightness -> valueToAction.get(brightnessToValue.get(brightness)), img.averageBrightness()) .run(); } }