code: public static void walkEntityTree(final EntityContainer container, final int maxDepth,
  	    final EntityVisitor visitor) {
  	final EntityTreeWalker walker = new EntityTreeWalker(container, maxDepth, visitor);
  	while (walker.isWalking()) {
  	    walker.walk();
  	}
      }
docs: Walks through all entities (recursive and breadth-first). Walking can be stopped or filtered
  based on the visit result returned.
  
  @param container
  Entity container.
  @param maxDepth
  Maximum depth of the walk.
  @param visitor
  Entity visitor.
  
  @see EntityVisitor