001/*
002 * JPPF.
003 * Copyright (C) 2005-2018 JPPF Team.
004 * http://www.jppf.org
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 *   http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019package org.jppf.utils.collections;
020
021import java.util.*;
022
023/**
024 * A sorted map whose values are sets of a given component type.
025 * @param <K> the type of keys in the map.
026 * @param <V> the type of values in the collections mapped to the keys.
027 * @author Laurent Cohen
028 */
029public class SetSortedMap<K, V> extends AbstractCollectionSortedMap<K, V> {
030  /**
031   * Explicit serialVersionUID.
032   */
033  private static final long serialVersionUID = 1L;
034
035  /**
036   * Default cosntructor.
037   */
038  public SetSortedMap() {
039    super();
040  }
041
042  /**
043   * Default cosntructor.
044   * @param comparator comparator used to sort the keys.
045   */
046  public SetSortedMap(final Comparator<K> comparator) {
047    super(comparator);
048  }
049
050  @Override
051  protected Collection<V> newCollection() {
052    return new HashSet<>();
053  }
054}