Skip to content

Commit 84ca882

Browse files
committed
fix(model-api): missing ID based INode.addNewChildren
There was only an `addNewChildren` method that accepts a string for the role. Added one that accepts an `IChildLink` to make the API consistent.
1 parent fe8ec11 commit 84ca882

File tree

1 file changed

+4
-0
lines changed
  • model-api/src/commonMain/kotlin/org/modelix/model/api

1 file changed

+4
-0
lines changed

model-api/src/commonMain/kotlin/org/modelix/model/api/INode.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ interface INode {
124124
return concepts.map { addNewChild(role, index, it) }
125125
}
126126

127+
fun addNewChildren(link: IChildLink, index: Int, concepts: List<IConceptReference?>): List<INode> {
128+
return concepts.map { addNewChild(link, index, it) }
129+
}
130+
127131
/**
128132
* Removes the given node from this node's children.
129133
*

0 commit comments

Comments
 (0)