public boolean restrict(Object exclude) {
        int index = shownHistory.indexOf(exclude);
        if (index != -1) {
            if (shownHistory == history) {
                shownHistory = new ArrayList<>(history);
            }

            shownHistory.remove(index);
            fireIntervalAdded(this, index, index);
            return true;
        }

        return false;
    }
public boolean restrict(Object exclude)