The node immediately preceding this node. If there is no such node, this
returns {@code null}.

@return previous node or {@code null}
352426
public Tree getPreviousSibling() {
		if (parent != null && key != null) {
			if (key instanceof Integer) {
				int idx = (int) key;
				if (idx < 1) {
					return null;
				}
				return parent.get(idx - 1);
			}
			Tree previous = null;
			for (Tree child : parent) {
				if (key.equals(child.key)) {
					return previous;
				}
				previous = child;
			}
		}
		return null;
	}
1133459
@SuppressWarnings("unchecked") //suppress warnings to return an ADStarNode instead of Node, which is the inherited return type from parent
    @Override
    public ADStarNodeImpl<A, S, C> previousNode() {
        return (ADStarNodeImpl<A, S, C>) previousNode;
    }
757301
public synchronized Node nonMasterNode() {
        final ClusterState state = client().admin().cluster().prepareState().execute().actionGet().getState();
        final String name = state.nodes().getMasterNode().getName();
        for (final Node node : nodeList) {
            if (!node.isClosed() && !name.equals(node.settings().get(NODE_NAME))) {
                return node;
            }
        }
        return null;
    }
1287758
public Node nextNode() {

		if (currentNode == null)
			return null;

		Node result = getFirstChild(currentNode);

		if (result != null) {
			currentNode = result;
			return result;
		}

		result = getNextSibling(currentNode);

		if (result != null) {
			currentNode = result;
			return result;
		}

		// return parent's 1st sibling.
		Node parent = getParentNode(currentNode);
		while (parent != null) {
			result = getNextSibling(parent);
			if (result != null) {
				currentNode = result;
				return result;
			} else {
				parent = getParentNode(parent);
			}
		}

		// end , return null
		return null;
	}
152832
public final int next(int node) {
        final int right = right(node);
        if (right != NIL) {
            return first(right);
        } else {
            int parent = parent(node);
            while (parent != NIL && node == right(parent)) {
                node = parent;
                parent = parent(parent);
            }
            return parent;
        }
    }
25187
public Tree<T> findPreOrderNext(){
        if( hasChildren() ){
            return getFirstChild();
        }
        if( hasNext() ){
            return getNext();
        }
        Tree<T> parent = getParent();
        while( parent != null ){
            if( parent.hasNext() ){
                return parent.getNext();
            }
            parent = parent.getParent();
        }
        return null;
    }
335103
public Node nextAvailableNode() {
        if (!isInit) {
            init();
        }
        currentNodeIndex++;
        if (currentNodeIndex >= allNodes.length) {
            currentNodeIndex = 0;
        }
        return currentNode();
    }
423804
public Versioned<E> previous() {
        if(hasPrevious()) {
            E resultValue = _previousNode.getValue().getValue();
            _lastId = _previousNode.getValue().getId();
            _lastCall = LastCall.PREVIOUS;
            _nextNode = _previousNode;
            _isNextSet = true;
            _isPreviousSet = false;
            return new Versioned<E>(resultValue, _previousNode.getVersion());
        } else {
            throw new NoSuchElementException();
        }
    }
624161
public Node root() {
        Node node = this;
        while (node.parentNode != null)
            node = node.parentNode;
        return node;
    }
1316233
public static <T extends GraphNode<T>> T getFirstChild(T node) {
        return hasChildren(node) ? node.getChildren().get(0) : null;
    }
302987
function topLevelNodeBefore(node, top) {
    while (!node.previousSibling && node.parentNode != top)
      node = node.parentNode;
    return topLevelNodeAt(node.previousSibling, top);
  }
1143737
public LeftTupleSinkNode removeFirst() {
        if ( this.firstNode == null ) {
            return null;
        }
        final LeftTupleSinkNode node = this.firstNode;
        this.firstNode = node.getNextLeftTupleSinkNode();
        node.setNextLeftTupleSinkNode( null );
        if ( this.firstNode != null ) {
            this.firstNode.setPreviousLeftTupleSinkNode( null );
        } else {
            this.lastNode = null;
        }
        this.size--;
        return node;
    }
1188225
private Object getPreviousElement() {
        Object element = null;
        while (currentIndex >= startIndex && element == null) {
            currentIndex--;
            element = getElement();
        }
        return element;
    }
821323
protected int getNextNode()
  {
    if (m_foundLast)
      return DTM.NULL;

    if (m_isFresh)
    {
      m_currentNode = m_traverser.first(m_root);
      m_isFresh = false;
    }
    // I shouldn't have to do this the check for current node, I think.
    // numbering\numbering24.xsl fails if I don't do this.  I think 
    // it occurs as the walkers are backing up. -sb
    else if(DTM.NULL != m_currentNode) 
    {
      m_currentNode = m_traverser.next(m_root, m_currentNode);
    }

    if (DTM.NULL == m_currentNode)
      this.m_foundLast = true;

    return m_currentNode;
  }
337703
public NodeT getNext() {
        String nextItemKey = queue.poll();
        if (nextItemKey == null) {
            return null;
        }
        return nodeTable.get(nextItemKey);
    }
1213924
function(node) {

	if( node instanceof NWTNodeInstance ) {
		node = node._node;
	}

	var child = this.one('*');

	this._node.insertBefore(node, (child._node? child._node : null));
	
	return this;
}
38931
public Optional<E> getPrevious() {
        return Optional.of(currentIndex).filter(getGreater(0))
                .map(i -> linkedList.get(--currentIndex));
    }