source: osm/applications/editors/josm/plugins/opendata/includes/org/jopendocument/util/CollectionMap.java

Last change on this file was 36483, checked in by stoecker, 4 months ago

set eol-style, fix checkstyle issues, add ignores

  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1/*
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3 *
4 * Copyright 2008 jOpenDocument, by ILM Informatique. All rights reserved.
5 *
6 * The contents of this file are subject to the terms of the GNU
7 * General Public License Version 3 only ("GPL").
8 * You may not use this file except in compliance with the License.
9 * You can obtain a copy of the License at http://www.gnu.org/licenses/gpl-3.0.html
10 * See the License for the specific language governing permissions and limitations under the License.
11 *
12 * When distributing the software, include this License Header Notice in each file.
13 *
14 */
15
16package org.jopendocument.util;
17
18import static java.util.Arrays.asList;
19
20import org.apache.commons.collections4.multimap.HashSetValuedHashMap;
21
22/**
23 * Une MultiMap.
24 *
25 * @author ILM Informatique 8 sept. 2004
26 * @param <K> type of the keys
27 * @param <V> type of elements in collections
28 */
29@SuppressWarnings({ "unchecked", "serial" })
30public class CollectionMap<K, V> extends HashSetValuedHashMap<K,V> {
31
32 /**
33 * Une nouvelle map
34 */
35 public CollectionMap() {
36 }
37
38 /**
39 * Une nouvelle map
40 *
41 * @param initialCapacity the initial capacity.
42 */
43 public CollectionMap(final int initialCapacity) {
44 super(initialCapacity);
45 }
46
47 public boolean putAll(K key, V... values) {
48 return this.putAll(key, asList(values));
49 }
50}
Note: See TracBrowser for help on using the repository browser.