void saveSelection() {
    mySelectedItems.clear();

    int[] indices = myList.getSelectedIndices();
    List<?> selectedItemsList;
    if (indices.length == 1 && myListModel.isMoreElement(indices[0])) {
      myMoreSelected = true;
      selectedItemsList = Collections.singletonList(myListModel.getElementAt(indices[0] - 1));
    }
    else {
      myMoreSelected = false;
      selectedItemsList = Arrays.stream(indices)
        .filter(i -> !myListModel.isMoreElement(i))
        .mapToObj(i -> myListModel.getElementAt(i))
        .collect(Collectors.toList());
    }

    mySelectedItems.addAll(selectedItemsList);
  }
void saveSelection()