]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.debug.ui/src/org/simantics/debug/ui/internal/HashMultiMap.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.debug.ui / src / org / simantics / debug / ui / internal / HashMultiMap.java
index b37a00370c7e265842ce493ba23467a7c2e54011..5fb7c3479d4a091b419acab48ab306ce5b51c266 100644 (file)
@@ -1,45 +1,45 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- *     VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.debug.ui.internal;\r
-\r
-import java.util.ArrayList;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-\r
-public class HashMultiMap<D,R> extends HashMap<D,List<R>> {\r
-\r
-    private static final long serialVersionUID = 8928508639019379832L;\r
-\r
-    public void add(D a, R b) {\r
-        List<R> elements = get(a);\r
-        if(elements == null) {\r
-            elements = new ArrayList<R>(1);\r
-            put(a, elements);\r
-        }\r
-        elements.add(b);\r
-    }\r
-    \r
-//    public boolean remove(D a, R b) {\r
-//        List<R> elements = get(a);\r
-//        if(elements == null) \r
-//            return false;\r
-//        if(elements.remove(b)) {\r
-//            // This would makes in some applications\r
-//            //if(elements.isEmpty())\r
-//            //  remove(a);\r
-//            return true;\r
-//        }\r
-//        else\r
-//            return false;\r
-//    }\r
-    \r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.debug.ui.internal;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+public class HashMultiMap<D,R> extends HashMap<D,List<R>> {
+
+    private static final long serialVersionUID = 8928508639019379832L;
+
+    public void add(D a, R b) {
+        List<R> elements = get(a);
+        if(elements == null) {
+            elements = new ArrayList<R>(1);
+            put(a, elements);
+        }
+        elements.add(b);
+    }
+    
+//    public boolean remove(D a, R b) {
+//        List<R> elements = get(a);
+//        if(elements == null) 
+//            return false;
+//        if(elements.remove(b)) {
+//            // This would makes in some applications
+//            //if(elements.isEmpty())
+//            //  remove(a);
+//            return true;
+//        }
+//        else
+//            return false;
+//    }
+    
+}