class SelectionInfo {

    void add(String id, T item) {
        if (!multiSelect) {
            reset();
        }
        selection.put(id, item);
    }

      SelectionInfo(Function<T, String> identifier, boolean multiSelect);
      SelectionInfo(Function<T, String> identifier, boolean multiSelect, Map<String, T> selection);

}