[
  {
    "path": "README.md",
    "content": "# yet-another-tree-structure"
  },
  {
    "path": "csharp/CSharpTree/App.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n<configuration>\r\n    <startup> \r\n        <supportedRuntime version=\"v4.0\" sku=\".NETFramework,Version=v4.5\" />\r\n    </startup>\r\n</configuration>"
  },
  {
    "path": "csharp/CSharpTree/CSharpTree.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProjectGuid>{4F3E0879-E048-4D79-B2D0-F9D8A5218F8A}</ProjectGuid>\r\n    <OutputType>Exe</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>CSharpTree</RootNamespace>\r\n    <AssemblyName>CSharpTree</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r\n    <FileAlignment>512</FileAlignment>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\Debug\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\Release\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n    <Reference Include=\"System.Data.DataSetExtensions\" />\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Xml\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n    <Compile Include=\"SampleData.cs\" />\r\n    <Compile Include=\"SampleIterating.cs\" />\r\n    <Compile Include=\"SampleSearching.cs\" />\r\n    <Compile Include=\"TreeNode.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"App.config\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "csharp/CSharpTree/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"CSharpTree\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"CSharpTree\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2013\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"cb7b1cae-9306-4b82-b99d-16ff56d33f33\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "csharp/CSharpTree/SampleData.cs",
    "content": "﻿namespace CSharpTree\r\n{\r\n    class SampleData\r\n    {\r\n        public static TreeNode<string> GetSet1()\r\n        {\r\n            TreeNode<string> root = new TreeNode<string>(\"root\");\r\n            {\r\n                TreeNode<string> node0 = root.AddChild(\"node0\");\r\n                TreeNode<string> node1 = root.AddChild(\"node1\");\r\n                TreeNode<string> node2 = root.AddChild(\"node2\");\r\n                {\r\n                    TreeNode<string> node20 = node2.AddChild(null);\r\n                    TreeNode<string> node21 = node2.AddChild(\"node21\");\r\n                    {\r\n                        TreeNode<string> node210 = node21.AddChild(\"node210\");\r\n                        TreeNode<string> node211 = node21.AddChild(\"node211\");\r\n                    }\r\n                }\r\n                TreeNode<string> node3 = root.AddChild(\"node3\");\r\n                {\r\n                    TreeNode<string> node30 = node3.AddChild(\"node30\");\r\n                }\r\n            }\r\n\r\n            return root;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "csharp/CSharpTree/SampleIterating.cs",
    "content": "﻿using System;\r\nusing System.Text;\r\n\r\nnamespace CSharpTree\r\n{\r\n    class SampleIterating\r\n    {\r\n        static void MainTest(string[] args)\r\n        {\r\n            TreeNode<string> treeRoot = SampleData.GetSet1();\r\n            foreach (TreeNode<string> node in treeRoot)\r\n            {\r\n                string indent = CreateIndent(node.Level);\r\n                Console.WriteLine(indent + (node.Data ?? \"null\"));\r\n            }\r\n        }\r\n\r\n        private static String CreateIndent(int depth)\r\n        {\r\n            StringBuilder sb = new StringBuilder();\r\n            for (int i = 0; i < depth; i++)\r\n            {\r\n                sb.Append(' ');\r\n            }\r\n            return sb.ToString();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "csharp/CSharpTree/SampleSearching.cs",
    "content": "﻿using System;\r\n\r\nnamespace CSharpTree\r\n{\r\n    class SampleSearching\r\n    {\r\n        static void Main(string[] args)\r\n        {\r\n            TreeNode<string> treeRoot = SampleData.GetSet1();\r\n            TreeNode<string> found = treeRoot.FindTreeNode(node => node.Data != null && node.Data.Contains(\"210\"));\r\n\r\n            Console.WriteLine(\"Found: \" + found);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "csharp/CSharpTree/TreeNode.cs",
    "content": "﻿using System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\n\r\nnamespace CSharpTree\r\n{\r\n    public class TreeNode<T> : IEnumerable<TreeNode<T>>\r\n    {\r\n\r\n        public T Data { get; set; }\r\n        public TreeNode<T> Parent { get; set; }\r\n        public ICollection<TreeNode<T>> Children { get; set; }\r\n\r\n        public Boolean IsRoot\r\n        {\r\n            get { return Parent == null; }\r\n        }\r\n\r\n        public Boolean IsLeaf\r\n        {\r\n            get { return Children.Count == 0; }\r\n        }\r\n\r\n        public int Level\r\n        {\r\n            get\r\n            {\r\n                if (this.IsRoot)\r\n                    return 0;\r\n                return Parent.Level + 1;\r\n            }\r\n        }\r\n\r\n\r\n        public TreeNode(T data)\r\n        {\r\n            this.Data = data;\r\n            this.Children = new LinkedList<TreeNode<T>>();\r\n\r\n            this.ElementsIndex = new LinkedList<TreeNode<T>>();\r\n            this.ElementsIndex.Add(this);\r\n        }\r\n\r\n        public TreeNode<T> AddChild(T child)\r\n        {\r\n            TreeNode<T> childNode = new TreeNode<T>(child) { Parent = this };\r\n            this.Children.Add(childNode);\r\n\r\n            this.RegisterChildForSearch(childNode);\r\n\r\n            return childNode;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return Data != null ? Data.ToString() : \"[data null]\";\r\n        }\r\n\r\n\r\n        #region searching\r\n        \r\n        private ICollection<TreeNode<T>> ElementsIndex { get; set; }\r\n\r\n        private void RegisterChildForSearch(TreeNode<T> node)\r\n        {\r\n            ElementsIndex.Add(node);\r\n            if (Parent != null)\r\n                Parent.RegisterChildForSearch(node);\r\n        }\r\n\r\n        public TreeNode<T> FindTreeNode(Func<TreeNode<T>, bool> predicate)\r\n        {\r\n            return this.ElementsIndex.FirstOrDefault(predicate);\r\n        }\r\n\r\n        #endregion\r\n\r\n\r\n        #region iterating\r\n        \r\n        IEnumerator IEnumerable.GetEnumerator()\r\n        {\r\n            return GetEnumerator();\r\n        }\r\n\r\n        public IEnumerator<TreeNode<T>> GetEnumerator()\r\n        {\r\n            yield return this;\r\n            foreach (var directChild in this.Children)\r\n            {\r\n                foreach (var anyChild in directChild)\r\n                    yield return anyChild;\r\n            }\r\n        }\r\n\r\n        #endregion\r\n    }\r\n}\r\n"
  },
  {
    "path": "csharp/CSharpTree.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 2012\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"CSharpTree\", \"CSharpTree\\CSharpTree.csproj\", \"{4F3E0879-E048-4D79-B2D0-F9D8A5218F8A}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Any CPU = Debug|Any CPU\r\n\t\tRelease|Any CPU = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{4F3E0879-E048-4D79-B2D0-F9D8A5218F8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{4F3E0879-E048-4D79-B2D0-F9D8A5218F8A}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{4F3E0879-E048-4D79-B2D0-F9D8A5218F8A}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{4F3E0879-E048-4D79-B2D0-F9D8A5218F8A}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "java/.classpath",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<classpath>\r\n\t<classpathentry kind=\"src\" path=\"src\"/>\r\n\t<classpathentry kind=\"con\" path=\"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6\"/>\r\n\t<classpathentry kind=\"output\" path=\"bin\"/>\r\n</classpath>\r\n"
  },
  {
    "path": "java/.project",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<projectDescription>\r\n\t<name>yet-another-tree-structure</name>\r\n\t<comment></comment>\r\n\t<projects>\r\n\t</projects>\r\n\t<buildSpec>\r\n\t\t<buildCommand>\r\n\t\t\t<name>org.eclipse.jdt.core.javabuilder</name>\r\n\t\t\t<arguments>\r\n\t\t\t</arguments>\r\n\t\t</buildCommand>\r\n\t</buildSpec>\r\n\t<natures>\r\n\t\t<nature>org.eclipse.jdt.core.javanature</nature>\r\n\t</natures>\r\n</projectDescription>\r\n"
  },
  {
    "path": "java/.settings/org.eclipse.jdt.core.prefs",
    "content": "eclipse.preferences.version=1\r\norg.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled\r\norg.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6\r\norg.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve\r\norg.eclipse.jdt.core.compiler.compliance=1.6\r\norg.eclipse.jdt.core.compiler.debug.lineNumber=generate\r\norg.eclipse.jdt.core.compiler.debug.localVariable=generate\r\norg.eclipse.jdt.core.compiler.debug.sourceFile=generate\r\norg.eclipse.jdt.core.compiler.problem.assertIdentifier=error\r\norg.eclipse.jdt.core.compiler.problem.enumIdentifier=error\r\norg.eclipse.jdt.core.compiler.source=1.6\r\n"
  },
  {
    "path": "java/src/com/tree/SampleData.java",
    "content": "package com.tree;\r\n\r\nclass SampleData {\r\n\r\n\tpublic static TreeNode<String> getSet1() {\r\n\t\tTreeNode<String> root = new TreeNode<String>(\"root\");\r\n\t\t{\r\n\t\t\tTreeNode<String> node0 = root.addChild(\"node0\");\r\n\t\t\tTreeNode<String> node1 = root.addChild(\"node1\");\r\n\t\t\tTreeNode<String> node2 = root.addChild(\"node2\");\r\n\t\t\t{\r\n\t\t\t\tTreeNode<String> node20 = node2.addChild(null);\r\n\t\t\t\tTreeNode<String> node21 = node2.addChild(\"node21\");\r\n\t\t\t\t{\r\n\t\t\t\t\tTreeNode<String> node210 = node21.addChild(\"node210\");\r\n\t\t\t\t\tTreeNode<String> node211 = node21.addChild(\"node211\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tTreeNode<String> node3 = root.addChild(\"node3\");\r\n\t\t\t{\r\n\t\t\t\tTreeNode<String> node30 = node3.addChild(\"node30\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn root;\r\n\t}\r\n\r\n\tpublic static TreeNode<String> getSetSOF() {\r\n\t\tTreeNode<String> root = new TreeNode<String>(\"root\");\r\n\t\t{\r\n\t\t\tTreeNode<String> node0 = root.addChild(\"node0\");\r\n\t\t\tTreeNode<String> node1 = root.addChild(\"node1\");\r\n\t\t\tTreeNode<String> node2 = root.addChild(\"node2\");\r\n\t\t\t{\r\n\t\t\t\tTreeNode<String> node20 = node2.addChild(null);\r\n\t\t\t\tTreeNode<String> node21 = node2.addChild(\"node21\");\r\n\t\t\t\t{\r\n\t\t\t\t\tTreeNode<String> node210 = node20.addChild(\"node210\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn root;\r\n\t}\r\n}"
  },
  {
    "path": "java/src/com/tree/SampleIterating.java",
    "content": "package com.tree;\r\n\r\nclass SampleIterating {\r\n\r\n\tpublic static void main(String[] args) {\r\n\t\tTreeNode<String> treeRoot = SampleData.getSet1();\r\n\t\tfor (TreeNode<String> node : treeRoot) {\r\n\t\t\tString indent = createIndent(node.getLevel());\r\n\t\t\tSystem.out.println(indent + node.data);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static String createIndent(int depth) {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tfor (int i = 0; i < depth; i++) {\r\n\t\t\tsb.append(' ');\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}\r\n\r\n}"
  },
  {
    "path": "java/src/com/tree/SampleSearching.java",
    "content": "package com.tree;\r\n\r\nclass SampleSearching {\r\n\r\n\tpublic static void main(String[] args) {\r\n\t\t\r\n\t\tComparable<String> searchCriteria = new Comparable<String>() {\r\n\t\t\t@Override\r\n\t\t\tpublic int compareTo(String treeData) {\r\n\t\t\t\tif (treeData == null)\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\tboolean nodeOk = treeData.contains(\"210\");\r\n\t\t\t\treturn nodeOk ? 0 : 1;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tTreeNode<String> treeRoot = SampleData.getSet1();\r\n\t\tTreeNode<String> found = treeRoot.findTreeNode(searchCriteria);\r\n\r\n\t\tSystem.out.println(\"Found: \" + found);\r\n\t}\r\n\r\n}"
  },
  {
    "path": "java/src/com/tree/TreeNode.java",
    "content": "package com.tree;\r\n\r\nimport java.util.Iterator;\r\nimport java.util.LinkedList;\r\nimport java.util.List;\r\n\r\npublic class TreeNode<T> implements Iterable<TreeNode<T>> {\r\n\r\n\tpublic T data;\r\n\tpublic TreeNode<T> parent;\r\n\tpublic List<TreeNode<T>> children;\r\n\r\n\tpublic boolean isRoot() {\r\n\t\treturn parent == null;\r\n\t}\r\n\r\n\tpublic boolean isLeaf() {\r\n\t\treturn children.size() == 0;\r\n\t}\r\n\r\n\tprivate List<TreeNode<T>> elementsIndex;\r\n\r\n\tpublic TreeNode(T data) {\r\n\t\tthis.data = data;\r\n\t\tthis.children = new LinkedList<TreeNode<T>>();\r\n\t\tthis.elementsIndex = new LinkedList<TreeNode<T>>();\r\n\t\tthis.elementsIndex.add(this);\r\n\t}\r\n\r\n\tpublic TreeNode<T> addChild(T child) {\r\n\t\tTreeNode<T> childNode = new TreeNode<T>(child);\r\n\t\tchildNode.parent = this;\r\n\t\tthis.children.add(childNode);\r\n\t\tthis.registerChildForSearch(childNode);\r\n\t\treturn childNode;\r\n\t}\r\n\r\n\tpublic int getLevel() {\r\n\t\tif (this.isRoot())\r\n\t\t\treturn 0;\r\n\t\telse\r\n\t\t\treturn parent.getLevel() + 1;\r\n\t}\r\n\r\n\tprivate void registerChildForSearch(TreeNode<T> node) {\r\n\t\telementsIndex.add(node);\r\n\t\tif (parent != null)\r\n\t\t\tparent.registerChildForSearch(node);\r\n\t}\r\n\r\n\tpublic TreeNode<T> findTreeNode(Comparable<T> cmp) {\r\n\t\tfor (TreeNode<T> element : this.elementsIndex) {\r\n\t\t\tT elData = element.data;\r\n\t\t\tif (cmp.compareTo(elData) == 0)\r\n\t\t\t\treturn element;\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic String toString() {\r\n\t\treturn data != null ? data.toString() : \"[data null]\";\r\n\t}\r\n\r\n\t@Override\r\n\tpublic Iterator<TreeNode<T>> iterator() {\r\n\t\tTreeNodeIter<T> iter = new TreeNodeIter<T>(this);\r\n\t\treturn iter;\r\n\t}\r\n\r\n}\r\n"
  },
  {
    "path": "java/src/com/tree/TreeNodeIter.java",
    "content": "package com.tree;\r\n\r\nimport java.util.Iterator;\r\n\r\npublic class TreeNodeIter<T> implements Iterator<TreeNode<T>> {\r\n\r\n\tenum ProcessStages {\r\n\t\tProcessParent, ProcessChildCurNode, ProcessChildSubNode\r\n\t}\r\n\r\n\tprivate TreeNode<T> treeNode;\r\n\r\n\tpublic TreeNodeIter(TreeNode<T> treeNode) {\r\n\t\tthis.treeNode = treeNode;\r\n\t\tthis.doNext = ProcessStages.ProcessParent;\r\n\t\tthis.childrenCurNodeIter = treeNode.children.iterator();\r\n\t}\r\n\r\n\tprivate ProcessStages doNext;\r\n\tprivate TreeNode<T> next;\r\n\tprivate Iterator<TreeNode<T>> childrenCurNodeIter;\r\n\tprivate Iterator<TreeNode<T>> childrenSubNodeIter;\r\n\r\n\t@Override\r\n\tpublic boolean hasNext() {\r\n\r\n\t\tif (this.doNext == ProcessStages.ProcessParent) {\r\n\t\t\tthis.next = this.treeNode;\r\n\t\t\tthis.doNext = ProcessStages.ProcessChildCurNode;\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif (this.doNext == ProcessStages.ProcessChildCurNode) {\r\n\t\t\tif (childrenCurNodeIter.hasNext()) {\r\n\t\t\t\tTreeNode<T> childDirect = childrenCurNodeIter.next();\r\n\t\t\t\tchildrenSubNodeIter = childDirect.iterator();\r\n\t\t\t\tthis.doNext = ProcessStages.ProcessChildSubNode;\r\n\t\t\t\treturn hasNext();\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tthis.doNext = null;\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (this.doNext == ProcessStages.ProcessChildSubNode) {\r\n\t\t\tif (childrenSubNodeIter.hasNext()) {\r\n\t\t\t\tthis.next = childrenSubNodeIter.next();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.next = null;\r\n\t\t\t\tthis.doNext = ProcessStages.ProcessChildCurNode;\r\n\t\t\t\treturn hasNext();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic TreeNode<T> next() {\r\n\t\treturn this.next;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic void remove() {\r\n\t\tthrow new UnsupportedOperationException();\r\n\t}\r\n\r\n}\r\n"
  }
]