]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.browsing.ui.graph.impl/src/org/simantics/browsing/ui/graph/impl/ResourceArrayProperty.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.browsing.ui.graph.impl / src / org / simantics / browsing / ui / graph / impl / ResourceArrayProperty.java
index 7e8435e8e8b1095d84bfaeb838274e28fac5a96b..bc84bd8a87efe1e123a0d414a27cd95342b1d2b2 100644 (file)
@@ -1,95 +1,95 @@
-/*******************************************************************************\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.browsing.ui.graph.impl;\r
-\r
-import org.simantics.browsing.ui.common.property.IArrayProperty;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.common.ResourceArray;\r
-import org.simantics.utils.datastructures.slice.ValueRange;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-public class ResourceArrayProperty extends ResourceProperty implements IArrayProperty {\r
-\r
-    protected final ValueRange range;\r
-\r
-    public ResourceArrayProperty(Type type, ValueRange range, Resource subject, Resource predicate, Resource value,\r
-            ResourceArray path) {\r
-        super(type, subject, predicate, value, path);\r
-        if (range == null)\r
-            throw new IllegalArgumentException("null value range");\r
-        this.range = range;\r
-    }\r
-\r
-    @Override\r
-    public ValueRange getRange() {\r
-        return range;\r
-    }\r
-\r
-    @Override\r
-    public String toString() {\r
-        return super.toString() + "[range=" + range + "]";\r
-    }\r
-\r
-    @Override\r
-    public int propertyHashCode() {\r
-        return super.propertyHashCode() * 31 + range.hashCode();\r
-    }\r
-\r
-    @Override\r
-    public boolean propertyEquals(Object obj) {\r
-        if (this == obj)\r
-            return true;\r
-        if (!super.propertyEquals(obj))\r
-            return false;\r
-        ResourceArrayProperty other = (ResourceArrayProperty) obj;\r
-        return range.equals(other.range);\r
-    }\r
-\r
-    @Override\r
-    public int hashCode() {\r
-        return range.hashCode() + 31 * super.hashCode();\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
-        ResourceArrayProperty other = (ResourceArrayProperty) obj;\r
-        return range.equals(other.range);\r
-    }\r
-\r
-    @Override\r
-    public IArrayProperty slice(ValueRange range) {\r
-        return new SlicedResourceArrayProperty(type, range, subject, predicate, value, path);\r
-    }\r
-\r
-    @Override\r
-    public boolean isSlice() {\r
-        return false;\r
-    }\r
-\r
-    private static class SlicedResourceArrayProperty extends ResourceArrayProperty {\r
-        public SlicedResourceArrayProperty(Type type, ValueRange range, Resource subject, Resource predicate,\r
-                Resource value, ResourceArray path) {\r
-            super(type, range, subject, predicate, value, path);\r
-        }\r
-        @Override\r
-        public boolean isSlice() {\r
-            return true;\r
-        }\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.browsing.ui.graph.impl;
+
+import org.simantics.browsing.ui.common.property.IArrayProperty;
+import org.simantics.db.Resource;
+import org.simantics.db.common.ResourceArray;
+import org.simantics.utils.datastructures.slice.ValueRange;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public class ResourceArrayProperty extends ResourceProperty implements IArrayProperty {
+
+    protected final ValueRange range;
+
+    public ResourceArrayProperty(Type type, ValueRange range, Resource subject, Resource predicate, Resource value,
+            ResourceArray path) {
+        super(type, subject, predicate, value, path);
+        if (range == null)
+            throw new IllegalArgumentException("null value range");
+        this.range = range;
+    }
+
+    @Override
+    public ValueRange getRange() {
+        return range;
+    }
+
+    @Override
+    public String toString() {
+        return super.toString() + "[range=" + range + "]";
+    }
+
+    @Override
+    public int propertyHashCode() {
+        return super.propertyHashCode() * 31 + range.hashCode();
+    }
+
+    @Override
+    public boolean propertyEquals(Object obj) {
+        if (this == obj)
+            return true;
+        if (!super.propertyEquals(obj))
+            return false;
+        ResourceArrayProperty other = (ResourceArrayProperty) obj;
+        return range.equals(other.range);
+    }
+
+    @Override
+    public int hashCode() {
+        return range.hashCode() + 31 * super.hashCode();
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (!super.equals(obj))
+            return false;
+        ResourceArrayProperty other = (ResourceArrayProperty) obj;
+        return range.equals(other.range);
+    }
+
+    @Override
+    public IArrayProperty slice(ValueRange range) {
+        return new SlicedResourceArrayProperty(type, range, subject, predicate, value, path);
+    }
+
+    @Override
+    public boolean isSlice() {
+        return false;
+    }
+
+    private static class SlicedResourceArrayProperty extends ResourceArrayProperty {
+        public SlicedResourceArrayProperty(Type type, ValueRange range, Resource subject, Resource predicate,
+                Resource value, ResourceArray path) {
+            super(type, range, subject, predicate, value, path);
+        }
+        @Override
+        public boolean isSlice() {
+            return true;
+        }
+    }
+
+}