Add link to another node
(self, anotherNode)
| 182 | return self.links.index(destNode) |
| 183 | |
| 184 | def addLink(self, anotherNode): |
| 185 | """ Add link to another node """ |
| 186 | if anotherNode is not None: |
| 187 | if self.links is None: self.links = [None] * 4 |
| 188 | idx = self.__getlink(anotherNode.values[0]) |
| 189 | if idx != -1: |
| 190 | if idx < self.refcnt and self.links[idx] is None: |
| 191 | self.links[idx] = anotherNode |
| 192 | else: |
| 193 | self.__insertLink(idx, anotherNode) |
| 194 | anotherNode.parent = self |
| 195 | return self |
| 196 | |
| 197 | def contains(self, a): |
| 198 | """ Check if node contains a given value """ |
no test coverage detected