Skip to content

Commit 856ac28

Browse files
committed
docs(model-api): clarified INode.moveChild and addNewChild
1 parent 485daf4 commit 856ac28

File tree

1 file changed

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

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ interface INode {
6969
val allChildren: Iterable<INode>
7070

7171
/**
72-
* Moves a child node to the given role and index.
72+
* Moves a node to this node's children with the given role and index.
73+
* The child node can originate from a different parent.
7374
*
7475
* @param role target role
75-
* @param index target index
76+
* @param index target index within the role
7677
* @param child child node to be moved
7778
*/
7879
fun moveChild(role: String?, index: Int, child: INode)
@@ -97,7 +98,7 @@ interface INode {
9798
* Creates and adds a new child node to this node at the specified index.
9899
*
99100
* @param role role, where the node should be added
100-
* @param index index, where the node should be added
101+
* @param index index within the role, where the node should be added
101102
* @param concept reference to a concept, of which the new node is instance of
102103
* @return new child node
103104
*/

0 commit comments

Comments
 (0)