@Override
    public void perform() {
        Boolean sorted = false;
        while (!sorted) {
            sorted = true;
            for (int i = 1; i < this.numbers.size(); i += 2) {
                this.main.compare(i, i - 1);
                if (this.numbers.get(i) < this.numbers.get(i - 1)) {
                    this.main.swap(i, i - 1);
                    sorted = false;
                }
            }
            for (int i = 2; i < this.numbers.size(); i += 2) {
                this.main.compare(i, i - 1);
                if (this.numbers.get(i) < this.numbers.get(i - 1)) {
                    this.main.swap(i, i - 1);
                    sorted = false;
                }
            }
        }

    }