protected function compare(AlphabeticalTreeNodeInterface $a, AlphabeticalTreeNodeInterface $b) {

        // Get the paths.
        $pathA = AlphabeticalTreeNodeHelper::getPath($a);
        $pathB = AlphabeticalTreeNodeHelper::getPath($b);

        // Count the path.
        $count = count($pathA);

        // Handle each path.
        for ($i = 0; $i < $count; ++$i) {

            // Get the items.
            $itemA = $pathA[$i];
            $itemB = true === isset($pathB[$i]) ? $pathB[$i] : null;

            // Compare the items.
            if ($itemA !== $itemB) {
                return null !== $itemB ? strcasecmp($itemA->getAlphabeticalTreeNodeLabel(), $itemB->getAlphabeticalTreeNodeLabel()) : 1;
            }
        }

        // Return.
        return 0;
    }