File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/java/org/tensorics/core/tree/domain Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,19 @@ public static EditableResolvingContext newResolvingContext() {
5656 return new ResolvingContextImpl ();
5757 }
5858
59+ /**
60+ * Merges the contexts of the iterable in the order they appear. Being a context a map-like object the order of
61+ * insertion matters.
62+ *
63+ * @param contexts the given contexts to merge
64+ * @return the context with all the values of the given contexts
65+ */
66+ public static EditableResolvingContext mergeContextsOrdered (Iterable <ResolvingContext > contexts ) {
67+ EditableResolvingContext newCtx = newResolvingContext ();
68+ contexts .forEach (newCtx ::putAllNew );
69+ return newCtx ;
70+ }
71+
5972 /**
6073 * creates a new rebuilding-context which allows the rebuilding of model nodes
6174 *
You can’t perform that action at this time.
0 commit comments