Visit last trie node.

@param visitor the visitor
@return the trie node
324491
public TrieNode visitLast(Consumer<? super TrieNode> visitor) {
    getChildren().forEach(n -> n.visitLast(visitor));
    visitor.accept(this);
    return refresh();
  }
870698
public ClassNode visitPublicSubTreeNodes($.Visitor<ClassNode> visitor) {
        return visitSubTree($.guardedVisitor(new $.Predicate<ClassNode>() {
            @Override
            public boolean test(ClassNode classNode) {
                return classNode.isPublic();
            }
        }, visitor));
    }
901523
public synchronized TreeEntry<K, V> lastEntry() {
		if (!validState) {
			throw new InvalidStateException();
		}
		final LeafNode<K, V> node = findSideLeafNode(false);
		if (node == null) {
			return null;
		}
		final int slot = node.allocated - 1;
		final K key = node.keys[slot];
		final V value = node.values[slot];
		return ((key == null) ? null : new TreeEntry<K, V>(key, value));
	}
468943
public Node traverse(NodeVisitor nodeVisitor) {
        Validate.notNull(nodeVisitor);
        NodeTraversor.traverse(nodeVisitor, this);
        return this;
    }
1144635
public TrieNode visitFirst(Consumer<? super TrieNode> visitor) {
    visitor.accept(this);
    TrieNode refresh = refresh();
    refresh.getChildren().forEach(n -> n.visitFirst(visitor));
    return refresh;
  }
1143231
private final static void traverse(Element element, ElementVisitor visitor) {

		visitor.visit(element);

		NodeList children = element.getChildNodes();

		for (int i = 0; i < children.getLength(); i++) {
			Node node = children.item(i);

			if (node.getNodeType() != Node.ELEMENT_NODE)
				continue;

			traverse((Element) node, visitor);
		}
	}
800672
function(node, last) {
						if(node.type && node.range) {
							if(last) {
								parents.push(last);
							}
							if(offset > node.range[0]) {
								found = node;
							} else {
								found = node;
								if(node.type !== Estraverse.Syntax.Program) {
									return Estraverse.VisitorOption.Break;
								}

							}
						}
					}
1318324
public Object childrenAccept(final XParserVisitor visitor, final org.w3c.dom.Node data) {
        org.w3c.dom.Node result = data;
        if (children != null) {
            for (int i = 0; i < children.length; ++i) {
                Object newResult = (children[i].jjtAccept(visitor, result));
                if (Boolean.FALSE.equals(newResult)) { // Boolean end early exit
                    return Boolean.FALSE;
                }
                if (Boolean.TRUE.equals(newResult)) { // No early exit yet
                    if ((i + 1) == children.length) {
                        return Boolean.TRUE;
                    }
                    continue;
                }
                if (newResult instanceof List) {
                    newResult = ((List<?>) newResult).isEmpty() ? null : ((List<?>) newResult).get(0);
                }
                if (newResult instanceof Number) {
                    return newResult;
                }
                result = (org.w3c.dom.Node) newResult; // proceed step expression
                if (result==null) {
                    break; // nothing can be found any more
                }
                    
            }
        }
        return DOMHelper.asList(result);
    }
923230
public synchronized Segment lastSegment() {
    assertOpen();
    Map.Entry<Long, Segment> segment = segments.lastEntry();
    return segment != null ? segment.getValue() : null;
  }
45363
public final void visit(final Visitor visitor)
	{
		final Visit visit = new Visit();
		try
		{
			visit(visitor, visit);
		}
		catch (final StopVisitationException ignored)
		{
		}
	}
1149240
@Override
	public void accept(Visitor<OptimizerNode> visitor) {
		if (visitor.preVisit(this)) {
			if (getPredecessorNode() != null) {
				getPredecessorNode().accept(visitor);
			} else {
				throw new CompilerException();
			}
			visitor.postVisit(this);
		}
	}
1351017
public static <T> T last(Iterator<T> iterator) {
		T result = null;
		while(iterator.hasNext()) {
			result = iterator.next();
		}
		return result;
	}
42048
public ClassNode visitPublicNotAbstractSubTreeNodes($.Visitor<ClassNode> visitor) {
        return visitSubTree($.guardedVisitor(new $.Predicate<ClassNode>() {
            @Override
            public boolean test(ClassNode classNode) {
                return classNode.publicNotAbstract();
            }
        }, visitor));
    }
1330741
private static <T extends Node> Map.Entry<CSNodeWrapper, T> findLastEntry(Map<CSNodeWrapper, T> map) {
        Map.Entry<CSNodeWrapper, T> nodeEntry = null;

        // Find the initial entry
        for (final Map.Entry<CSNodeWrapper, T> entry : map.entrySet()) {
            if (entry.getKey().getNextNode() == null) {
                nodeEntry = entry;
                break;
            }
        }

        return nodeEntry;
    }
998693
public int getLastPos(XPathContext xctxt)
  {

    int count = 0;
    AxesWalker savedWalker = wi().getLastUsedWalker();

    try
    {
      ReverseAxesWalker clone = (ReverseAxesWalker) this.clone();

      clone.setRoot(this.getRoot());

      clone.setPredicateCount(m_predicateIndex);

      clone.setPrevWalker(null);
      clone.setNextWalker(null);
      wi().setLastUsedWalker(clone);

      // Count 'em all
      // count = 1;
      int next;

      while (DTM.NULL != (next = clone.nextNode()))
      {
        count++;
      }
    }
    catch (CloneNotSupportedException cnse)
    {

      // can't happen
    }
    finally
    {
      wi().setLastUsedWalker(savedWalker);
    }

    return count;
  }
836758
public Node getLastChild()
  {

    ElemTemplateElement lastChild = null;

    for (ElemTemplateElement node = m_firstChild; node != null;
            node = node.m_nextSibling)
    {
      lastChild = node;
    }

    return lastChild;
  }
12857
public IndexNode visitFirstIndex(Consumer<? super IndexNode> visitor) {
    visitor.accept(this);
    IndexNode refresh = refresh();
    refresh.getChildren().forEach(n -> n.visitFirstIndex(visitor));
    return refresh;
  }