protected function computeIndex($toCompute)
    {
        if ($toCompute instanceof EventInterface) {
            $toCompute = $toCompute->getBegin();
        }
        $function = $this->indexFunction;

        return $function($toCompute);
    }