public function isBetterThan(Index $index)
    {
        if ($this->hasSameColumnNames($index->getColumnNames()) && $this->isUnique() && !$index->isUnique()) {
            return true;
        }

        return false;
    }
public function isBetterThan(Index $index)
    {
        if ($this->hasSameColumnNames($index->getColumnNames()) && $this->isUnique() && !$index->isUnique()) {
            return true;
        }

        return false;
    }
public function isBetterThan ( Index $ index ) { if ( $ this -> hasSameColumnNames ( $ index -> getColumnNames ( ) ) && $ this -> isUnique ( ) && ! $ index -> isUnique ( ) ) { return true ; } return false ; }
Checks if the index is better than the given index.
Better means the index can replace the given.

@param Fridge\DBAL\Schema\Index $index The candidate index.

@return boolean TRUE if the index is better than the given else FALSE.
Checks if the index is better than the given index . Better means the index can replace the given .