]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.diagram/src/org/simantics/diagram/symbolcontribution/SymbolGroup.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.diagram / src / org / simantics / diagram / symbolcontribution / SymbolGroup.java
index 74b3904872874666c57cd66e3f8f9dca4ec5f4ca..652ae5ace5f87178c749c0118f723b07ceae061d 100644 (file)
@@ -1,96 +1,96 @@
-/*******************************************************************************\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.diagram.symbolcontribution;\r
-\r
-import java.util.Arrays;\r
-\r
-import org.simantics.diagram.symbollibrary.ISymbolGroup;\r
-import org.simantics.diagram.symbollibrary.ISymbolItem;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-public class SymbolGroup extends NamedObject implements ISymbolGroup {\r
-\r
-    public static final ISymbolItem[] NO_ITEMS = {};\r
-\r
-    ISymbolItem[] items = NO_ITEMS;\r
-\r
-    private final String description;\r
-\r
-    public SymbolGroup(Object identification, String name) {\r
-        this(identification, name, name);\r
-    }\r
-\r
-    public SymbolGroup(Object identification, String name, ISymbolItem[] items) {\r
-        this(identification, name, name, items);\r
-    }\r
-\r
-    public SymbolGroup(Object identification, String name, String description) {\r
-        super(identification, name);\r
-        this.description = description;\r
-    }\r
-\r
-    public SymbolGroup(Object identification, String name, String description, ISymbolItem[] items) {\r
-        super(identification, name);\r
-        this.description = description;\r
-        this.items = items;\r
-    }\r
-\r
-    @Override\r
-    public String getDescription() {\r
-        return description;\r
-    }\r
-\r
-    @Override\r
-    public ISymbolItem[] getItems() {\r
-        return items;\r
-    }\r
-\r
-    public void setItems(ISymbolItem[] items) {\r
-        this.items = items;\r
-    }\r
-\r
-    @Override\r
-    public String toString() {\r
-        return super.toString() + "[item count=" + items.length + "]";\r
-    }\r
-\r
-    @Override\r
-    public int hashCode() {\r
-        final int prime = 31;\r
-        int result = super.hashCode();\r
-        result = prime * result + ((description == null) ? 0 : description.hashCode());\r
-        result = prime * result + Arrays.hashCode(items);\r
-        return result;\r
-    }\r
-\r
-    @Override\r
-    public boolean equals(Object obj) {\r
-        if (this == obj)\r
-            return true;\r
-        if (!super.equals(obj))\r
-            return false;\r
-        if (getClass() != obj.getClass())\r
-            return false;\r
-        SymbolGroup other = (SymbolGroup) obj;\r
-        if (description == null) {\r
-            if (other.description != null)\r
-                return false;\r
-        } else if (!description.equals(other.description))\r
-            return false;\r
-        if (!Arrays.equals(items, other.items))\r
-            return false;\r
-        return true;\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.diagram.symbolcontribution;
+
+import java.util.Arrays;
+
+import org.simantics.diagram.symbollibrary.ISymbolGroup;
+import org.simantics.diagram.symbollibrary.ISymbolItem;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public class SymbolGroup extends NamedObject implements ISymbolGroup {
+
+    public static final ISymbolItem[] NO_ITEMS = {};
+
+    ISymbolItem[] items = NO_ITEMS;
+
+    private final String description;
+
+    public SymbolGroup(Object identification, String name) {
+        this(identification, name, name);
+    }
+
+    public SymbolGroup(Object identification, String name, ISymbolItem[] items) {
+        this(identification, name, name, items);
+    }
+
+    public SymbolGroup(Object identification, String name, String description) {
+        super(identification, name);
+        this.description = description;
+    }
+
+    public SymbolGroup(Object identification, String name, String description, ISymbolItem[] items) {
+        super(identification, name);
+        this.description = description;
+        this.items = items;
+    }
+
+    @Override
+    public String getDescription() {
+        return description;
+    }
+
+    @Override
+    public ISymbolItem[] getItems() {
+        return items;
+    }
+
+    public void setItems(ISymbolItem[] items) {
+        this.items = items;
+    }
+
+    @Override
+    public String toString() {
+        return super.toString() + "[item count=" + items.length + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = super.hashCode();
+        result = prime * result + ((description == null) ? 0 : description.hashCode());
+        result = prime * result + Arrays.hashCode(items);
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (!super.equals(obj))
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        SymbolGroup other = (SymbolGroup) obj;
+        if (description == null) {
+            if (other.description != null)
+                return false;
+        } else if (!description.equals(other.description))
+            return false;
+        if (!Arrays.equals(items, other.items))
+            return false;
+        return true;
+    }
+
 }
\ No newline at end of file