public function isSame(ItemSet $that): bool
    {
        if (count($this->items) !== count($that->items)) {
            return false;
        }
        foreach ($this->items as $i => $item) {
            if (0 !== Item::compare($item, $that->items[$i])) {
                return false;
            }
        }
        return true;
    }
public function isSame(ItemSet $that): bool
    {
        if (count($this->items) !== count($that->items)) {
            return false;
        }
        foreach ($this->items as $i => $item) {
            if (0 !== Item::compare($item, $that->items[$i])) {
                return false;
            }
        }
        return true;
    }
public function isSame ( ItemSet $ that ) : bool { if ( count ( $ this -> items ) !== count ( $ that -> items ) ) { return false ; } foreach ( $ this -> items as $ i => $ item ) { if ( 0 !== Item :: compare ( $ item , $ that -> items [ $ i ] ) ) { return false ; } } return true ; }
Check equality with another set

Two sets are equal when both contains only equal items in any order.
In fact items are already sorted before for this comparison.
@param ItemSet $that Another set to compare with
@return bool Returns `true` when both sets are equal
Check equality with another set