Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2000-2024 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.vaadin.flow.component.combobox;
import java.io.Serializable;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import com.vaadin.flow.function.SerializableFunction;
/**
* Selection model for the {@link MultiSelectComboBox}, which implements the
* multi-select logic for the component. The model keeps track of the currently
* selected items, and allows adding and removing items from the selection,
* while ensuring that items can only be selected once (no duplicates). For
* identifying items, the model uses an identity provider, which is supposed to
* return a unique ID for each item. The identity provider implementation should
* be based on the identity provider used by the Flow data classes, for example
* {@link com.vaadin.flow.data.provider.DataProvider#getId(Object)}.
*
* @param
* the type of the item selectable from the combo box
*/
class MultiSelectComboBoxSelectionModel implements Serializable {
private Map