java/core/src/main/java/se/lth/cs/docria/Layer.java
/**
     * Return a stream of the nodespan
     * @param left the left node, node with lowest id
     * @param right the right node, node with highest id, inclusive.
     * @return Stream of nodes in range
     */
Return a stream of the nodespan
@param left the left node, node with lowest id
@param right the right node, node with highest id, inclusive.
@return Stream of nodes in range
Return a stream of the nodespan @param left the left node node with lowest id @param right the right node node with highest id inclusive . @return Stream of nodes in range
public Stream<Node> nodespan(Node left, Node right) {
        Objects.requireNonNull(left);
        Objects.requireNonNull(right);
        if(left.layer != this)
            throw new DataInconsistencyException(
                    String.format("Start node ( %s ) is not bound to this layer: %s", left, this));
        if(right.layer != this)
            throw new DataInconsistencyException(
                    String.format("Stop node ( %s ) is not bound to this layer: %s", right, this));
        if(left.id > right.id)
            throw new DataInconsistencyException(
                    String.format("Start and stop are not in sequence: start.id = %d, stop.id = %d", left.id, right.id)
            );
        return IntStream.range(left.id, right.id+1).mapToObj(this.storage::get).filter(Objects::nonNull);
    }
public Stream < Node > nodespan ( Node left , Node right ) { Objects . requireNonNull ( left ) ; Objects . requireNonNull ( right ) ; if ( left . layer != this ) throw new DataInconsistencyException ( String . format ( "Start node ( %s ) is not bound to this layer: %s" , left , this ) ) ; if ( right . layer != this ) throw new DataInconsistencyException ( String . format ( "Stop node ( %s ) is not bound to this layer: %s" , right , this ) ) ; if ( left . id > right . id ) throw new DataInconsistencyException ( String . format ( "Start and stop are not in sequence: start.id = %d, stop.id = %d" , left . id , right . id ) ) ; return IntStream . range ( left . id , right . id + 1 ) . mapToObj ( this . storage :: get ) . filter ( Objects :: nonNull ) ; }
Return a stream of the nodespan
 @param left the left node, node with lowest id
 @param right the right node, node with highest id, inclusive.
Return a stream of the nodespan @param left the left node node with lowest id @param right the right node node with highest id inclusive .