]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.graph/src/org/simantics/graph/representation/Extensions.java
Include cached hash code in TransferableGraph1 extensions map
[simantics/platform.git] / bundles / org.simantics.graph / src / org / simantics / graph / representation / Extensions.java
index 8a8cb3d568fa571e905a8bfc6a8c53245c77f856..375fb1416899f57bb40c66761b31504773bef870 100644 (file)
@@ -2,18 +2,33 @@ package org.simantics.graph.representation;
 
 import java.util.TreeMap;
 
+import org.simantics.databoard.Bindings;
+import org.simantics.databoard.binding.Binding;
 import org.simantics.databoard.binding.mutable.Variant;
 
 public class Extensions {
-       
+
+       public static final Binding BINDING = Bindings.getBindingUnchecked(Extensions.class);
+
+       /**
+        * Used for storing a cached hash code computed from a
+        * {@link TransferableGraph1} instance <em>without</em> this cached hashcode
+        * key,value pair in the <code>extensions</code> map.
+        */
+       public final static String CACHED_HASHCODE = "cached.hashCode";
+
        final public static String CLUSTERING = "clustering";
        final public static String CLUSTER_SETS = "clusterSets";
        final public static int NO_CLUSTER_SET = -1;
        final public static int ROOT_LIBRARY_CLUSTER_SET = -1;
        final public static int INDEX_ROOT_CLUSTER_SET = -2;
-       
-       public TreeMap<String, Variant> map = new TreeMap<String, Variant>();
-       
+
+       public TreeMap<String, Variant> map;
+
+       public Extensions() {
+               this.map = new TreeMap<>();
+       }
+
        public Extensions(TreeMap<String, Variant> map) {
                this.map = map;
        }