Visits all the keys and entries of the given map.

@param node the ObjectGraphNode containing the map.
967448
private void visitMap(final ObjectGraphNode node) {
		Map map = (Map) node.getValue();

		for (Iterator i = map.entrySet().iterator(); i.hasNext();) {
			Map.Entry entry = (Map.Entry) i.next();
			Object key = entry.getKey();

			if (key != null) {
				ObjectGraphNode keyNode = new ObjectGraphNode(++nodeCount, "key", key.getClass().
						getName(), key);
				node.add(keyNode);
				visit(keyNode);
			} else {
				ObjectGraphNode keyNode = new ObjectGraphNode(++nodeCount, "key", Object.class.
						getName(), null);
				node.add(keyNode);
			}

			Object value = entry.getValue();

			if (value != null) {
				ObjectGraphNode valueNode = new ObjectGraphNode(++nodeCount, "value", value.
						getClass().getName(), value);
				node.add(valueNode);
				visit(valueNode);
			} else {
				ObjectGraphNode valueNode = new ObjectGraphNode(++nodeCount, "value", Object.class.
						getName(), null);
				node.add(valueNode);
			}
		}

		adjustOverhead(node);
	}
1219708
private void visitArray(final ObjectGraphNode node) {
		if (node.getValue() instanceof Object[]) {
			Object[] array = (Object[]) node.getValue();

			for (int i = 0; i < array.length; i++) {
				String entryType = array[i] == null ? Object.class.getName() : array[i].getClass().
						getName();

				ObjectGraphNode childNode = new ObjectGraphNode(++nodeCount, "[" + i + "]",
						entryType, array[i]);
				node.add(childNode);
				visit(childNode);
			}
		} else {
			ObjectGraphNode childNode = new ObjectGraphNode(++nodeCount, "[primitive array]", node.
					getValue().getClass().getName(), node.getValue());
			node.add(childNode);
		}
	}
664010
@Override
    public void visit(NodeVisitor v) {
        if (v.visit(this)) {
            getTarget().visit(v);
            getProperty().visit(v);
        }
    }
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;
    }
204757
def traverse(node, on_enter=None, on_leave=None):
    
    node_type = NodeType(node['type'])

    if node_type not in ChildNodeAccessorMap:
        raise UnknownNodeTypeException(node_type)

    if on_enter:
        should_traverse_children = on_enter(node) is not SKIP_CHILDREN
    else:
        should_traverse_children = True

    if should_traverse_children:
        for property_accessor in ChildNodeAccessorMap[node_type]:
            accessor_func = property_accessor['accessor']
            prop_name = property_accessor['property_name']

            accessor_func(lambda child_node: traverse(child_node, on_enter, on_leave),
                          node[prop_name])

        for handler in _traverser_extensions:
            handler(node, on_enter=on_enter, on_leave=on_leave)

    if on_leave:
        on_leave(node)
381313
public void addNode(final INodeEntry node) {
        //convert to entity
        final ResourceXMLParser.Entity entity = createEntity(node);
        addEntity(entity);
    }
484673
public void visitAnnotations(AnnotatedNode node) {
        super.visitAnnotations(node);

        Map<Integer, List<AnnotationNode>> existing = new TreeMap<Integer, List<AnnotationNode>>();
        Map<Integer, List<AnnotationNode>> replacements = new LinkedHashMap<Integer, List<AnnotationNode>>();
        Map<Integer, AnnotationCollectorMode> modes = new LinkedHashMap<Integer, AnnotationCollectorMode>();
        int index = 0;
        for (AnnotationNode annotation : node.getAnnotations()) {
            findCollectedAnnotations(annotation, node, index, modes, existing, replacements);
            index++;
        }
        for (Map.Entry<Integer, List<AnnotationNode>> entry : replacements.entrySet()) {
            Integer replacementIndex = entry.getKey();
            List<AnnotationNode> annotationNodeList = entry.getValue();
            mergeCollectedAnnotations(modes.get(replacementIndex), existing, annotationNodeList);
            existing.put(replacementIndex, annotationNodeList);
        }
        List<AnnotationNode> mergedList = new ArrayList<AnnotationNode>();
        for (List<AnnotationNode> next : existing.values()) {
            mergedList.addAll(next);
        }

        node.getAnnotations().clear();
        node.getAnnotations().addAll(mergedList);

        for (AnnotationNode annotation : node.getAnnotations()) {
            Annotation transformClassAnnotation = getTransformClassAnnotation(annotation.getClassNode());
            if (transformClassAnnotation == null) {
                // skip if there is no such annotation
                continue;
            }
            addTransformsToClassNode(annotation, transformClassAnnotation);
        }
    }
987596
protected void initMaps()
	{
		// Initialize label, maps and queue

		dist = new HashMap<GraphObject, Integer>();
		colors = new HashMap<GraphObject, Integer>();
		queue = new LinkedList<Node>();
	}
10807
def visit(self, node):
        
        if Check(node, dict()).visit(self.pattern):
            self.result.add(node)
        self.generic_visit(node)
1206416
@Override
    public void visit(Node node) throws ELException {
        if (node instanceof AstFunction) {

            AstFunction funcNode = (AstFunction) node;

            Method m = null;

            if (this.fnMapper != null) {
                m = fnMapper.resolveFunction(funcNode.getPrefix(), funcNode
                        .getLocalName());
            }

            // References to variables that refer to lambda expressions will be
            // parsed as functions. This is handled at runtime but at this point
            // need to treat it as a variable rather than a function.
            if (m == null && this.varMapper != null &&
                    funcNode.getPrefix().length() == 0) {
                this.varMapper.resolveVariable(funcNode.getLocalName());
                return;
            }

            if (this.fnMapper == null) {
                throw new ELException(MessageFactory.get("error.fnMapper.null"));
            }

            if (m == null) {
                throw new ELException(MessageFactory.get(
                        "error.fnMapper.method", funcNode.getOutputName()));
            }

            int methodParameterCount = m.getParameterTypes().length;
            // AstFunction->MethodParameters->Parameters()
            int inputParameterCount = node.jjtGetChild(0).jjtGetNumChildren();
            if (m.isVarArgs() && inputParameterCount < methodParameterCount - 1 ||
                    !m.isVarArgs() && inputParameterCount != methodParameterCount) {
                throw new ELException(MessageFactory.get(
                        "error.fnMapper.paramcount", funcNode.getOutputName(),
                        "" + methodParameterCount, "" + node.jjtGetChild(0).jjtGetNumChildren()));
            }
        } else if (node instanceof AstIdentifier && this.varMapper != null) {
            String variable = ((AstIdentifier) node).getImage();

            // simply capture it
            this.varMapper.resolveVariable(variable);
        }
    }
4801
protected void visitChildren(ParentNode<? extends N> node) {
    List<? extends N> children = node.getChildren();
    int size = children.size();
    for (int i = 0; i < size; i++) {
      visit(children.get(i));
    }
  }
667369
public void visit(Visitor visitor) {
        for (Map.Entry<String, NodeT> item : nodeTable.entrySet()) {
            if (!visited.contains(item.getKey())) {
                this.dfs(visitor, item.getValue());
            }
        }
        visited.clear();
        time = 0;
        entryTime.clear();
        exitTime.clear();
        parent.clear();
        processed.clear();
    }
1341750
public void visitClass(ClassNode node) {
        // AIC are already done, doing them here again will lead to wrong scopes
        if (isAnonymous(node)) return;

        pushState();

        prepareVisit(node);

        super.visitClass(node);
        if (recurseInnerClasses) {
            Iterator<InnerClassNode> innerClasses = node.getInnerClasses();
            while (innerClasses.hasNext()) {
                visitClass(innerClasses.next());
            }
        }
        popState();
    }
770935
@Override
  public boolean visit(final PackageNode node) {
    if (!node.getName().isEmpty()) {
      this.graphStr
          .append("  ")
          .append(node.getName())
          .append(" [label=\"")
          .append(node.getFullName())
          .append("\", shape=folder];\n");
    }
    return true;
  }
53500
public static Iterable<String> iterate(final String node) {
        return new Iterable<String>() {
            @Override
            public Iterator<String> iterator() {
                return new Scanner(node).useDelimiter("/");
            }
        };
    }
1280009
@Override
    public void visit(final Root root) {
        final Map<String, GedObject> objectMap = root.getObjects();
        final Collection<GedObject> objects = objectMap.values();
        for (final GedObject gob : objects) {
            gob.accept(this);
        }
    }
444241
private void extractProperties(final Node node) {

		for (final String key : node.getPropertyKeys()) {

			final Object value = node.getProperty(key);
			if (value != null) {
				properties.put(key, value.getClass());
			}
		}
	}