Removes an 'edge', i.e. in reality it removes the information about the adjacent node from `adjacentNodesWithEdgeProperties`. The corresponding elements will be set to `null`, i.e. we'll have holes. Note: this decrements the `offset` of the following edges in the same block by one, but that's ok bec
(Direction direction, String label, int blockOffset)
| 527 | * @param blockOffset must have been initialized |
| 528 | */ |
| 529 | protected final synchronized void removeEdge(Direction direction, String label, int blockOffset) { |
| 530 | AdjacentNodes adjacentNodesTmp = this.adjacentNodes; |
| 531 | int offsetPos = getPositionInEdgeOffsets(direction, label); |
| 532 | int start = startIndex(adjacentNodesTmp, offsetPos) + blockOffset; |
| 533 | int strideSize = getStrideSize(label); |
| 534 | Object[] adjacentNodesWithEdgeProperties = adjacentNodesTmp.nodesWithEdgeProperties; |
| 535 | |
| 536 | for (int i = start; i < start + strideSize; i++) { |
| 537 | adjacentNodesWithEdgeProperties[i] = null; |
| 538 | } |
| 539 | |
| 540 | /* marking as dirty *after* we updated - if node gets serialized before we finish, it'll be marked as dirty */ |
| 541 | this.markAsDirty(); |
| 542 | } |
| 543 | |
| 544 | private Iterator<Edge> createDummyEdgeIterator(Direction direction, String... labels) { |
| 545 | if (labels.length == 1) { |
no test coverage detected