java.lang.Object
net.dontcode.core.Models
Represents an application model.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Map<String,MapOrString> applyChange(Map<String, MapOrString> orig, Change toApply) Merge the change into the model and returns the updated model.static MapOrStringfindAtPosition(Map<String, MapOrString> src, String position, boolean create) static MapOrStringfindAtPosition(MapOrString src, String position, boolean create) protected static voidrecursiveApplyChange(Map<String, MapOrString> orig, Change toApply, MapOrString oldContent, MapOrString newContent, String position, boolean isRoot)
-
Constructor Details
-
Models
public Models()
-
-
Method Details
-
applyChange
Merge the change into the model and returns the updated model. Does the same as the typescript function applyChange https://github.com/dont-code/core/blob/master/node/packages/core/src/lib/model/dont-code-model-manager.ts- Parameters:
orig-toApply-- Returns:
-
findAtPosition
-
findAtPosition
public static MapOrString findAtPosition(Map<String, MapOrString> src, String position, boolean create) -
recursiveApplyChange
protected static void recursiveApplyChange(Map<String, MapOrString> orig, Change toApply, MapOrString oldContent, MapOrString newContent, String position, boolean isRoot)
-