Interface CompositeRelationshipIterator

    • Method Detail

      • degree

        int degree​(long nodeId)
        Returns the degree of the given node id.
      • forEachInverseRelationship

        void forEachInverseRelationship​(long nodeId,
                                        CompositeRelationshipIterator.RelationshipConsumer consumer)
        Calls the given consumer for every inverse relationship of a given node. Inverse relationships basically mirror the relationships in the iterator. For example, if `forEachRelationship(42)` returns `1337` then the result of `forEachInverseRelationship(1337)` contains `42. For undirected relationships, accessing the inverse is never supported.

        Note, that the inverse index might not always be present. Check GraphStore.inverseIndexedRelationshipTypes() before calling this method to verify that the relevant relationship type is inverse indexed.

        Parameters:
        nodeId - the node for which to iterate the inverse relationships
        consumer - relationship consumer function