Repository: gt4dev/yet-another-tree-structure
Branch: master
Commit: f877f7123f60
Files: 17
Total size: 16.1 KB
Directory structure:
gitextract_q36xmw2f/
├── README.md
├── csharp/
│ ├── CSharpTree/
│ │ ├── App.config
│ │ ├── CSharpTree.csproj
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ ├── SampleData.cs
│ │ ├── SampleIterating.cs
│ │ ├── SampleSearching.cs
│ │ └── TreeNode.cs
│ └── CSharpTree.sln
└── java/
├── .classpath
├── .project
├── .settings/
│ └── org.eclipse.jdt.core.prefs
└── src/
└── com/
└── tree/
├── SampleData.java
├── SampleIterating.java
├── SampleSearching.java
├── TreeNode.java
└── TreeNodeIter.java
================================================
FILE CONTENTS
================================================
================================================
FILE: README.md
================================================
# yet-another-tree-structure
================================================
FILE: csharp/CSharpTree/App.config
================================================
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
================================================
FILE: csharp/CSharpTree/CSharpTree.csproj
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4F3E0879-E048-4D79-B2D0-F9D8A5218F8A}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CSharpTree</RootNamespace>
<AssemblyName>CSharpTree</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SampleData.cs" />
<Compile Include="SampleIterating.cs" />
<Compile Include="SampleSearching.cs" />
<Compile Include="TreeNode.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
================================================
FILE: csharp/CSharpTree/Properties/AssemblyInfo.cs
================================================
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CSharpTree")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CSharpTree")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("cb7b1cae-9306-4b82-b99d-16ff56d33f33")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
================================================
FILE: csharp/CSharpTree/SampleData.cs
================================================
namespace CSharpTree
{
class SampleData
{
public static TreeNode<string> GetSet1()
{
TreeNode<string> root = new TreeNode<string>("root");
{
TreeNode<string> node0 = root.AddChild("node0");
TreeNode<string> node1 = root.AddChild("node1");
TreeNode<string> node2 = root.AddChild("node2");
{
TreeNode<string> node20 = node2.AddChild(null);
TreeNode<string> node21 = node2.AddChild("node21");
{
TreeNode<string> node210 = node21.AddChild("node210");
TreeNode<string> node211 = node21.AddChild("node211");
}
}
TreeNode<string> node3 = root.AddChild("node3");
{
TreeNode<string> node30 = node3.AddChild("node30");
}
}
return root;
}
}
}
================================================
FILE: csharp/CSharpTree/SampleIterating.cs
================================================
using System;
using System.Text;
namespace CSharpTree
{
class SampleIterating
{
static void MainTest(string[] args)
{
TreeNode<string> treeRoot = SampleData.GetSet1();
foreach (TreeNode<string> node in treeRoot)
{
string indent = CreateIndent(node.Level);
Console.WriteLine(indent + (node.Data ?? "null"));
}
}
private static String CreateIndent(int depth)
{
StringBuilder sb = new StringBuilder();
for (int i = 0; i < depth; i++)
{
sb.Append(' ');
}
return sb.ToString();
}
}
}
================================================
FILE: csharp/CSharpTree/SampleSearching.cs
================================================
using System;
namespace CSharpTree
{
class SampleSearching
{
static void Main(string[] args)
{
TreeNode<string> treeRoot = SampleData.GetSet1();
TreeNode<string> found = treeRoot.FindTreeNode(node => node.Data != null && node.Data.Contains("210"));
Console.WriteLine("Found: " + found);
}
}
}
================================================
FILE: csharp/CSharpTree/TreeNode.cs
================================================
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace CSharpTree
{
public class TreeNode<T> : IEnumerable<TreeNode<T>>
{
public T Data { get; set; }
public TreeNode<T> Parent { get; set; }
public ICollection<TreeNode<T>> Children { get; set; }
public Boolean IsRoot
{
get { return Parent == null; }
}
public Boolean IsLeaf
{
get { return Children.Count == 0; }
}
public int Level
{
get
{
if (this.IsRoot)
return 0;
return Parent.Level + 1;
}
}
public TreeNode(T data)
{
this.Data = data;
this.Children = new LinkedList<TreeNode<T>>();
this.ElementsIndex = new LinkedList<TreeNode<T>>();
this.ElementsIndex.Add(this);
}
public TreeNode<T> AddChild(T child)
{
TreeNode<T> childNode = new TreeNode<T>(child) { Parent = this };
this.Children.Add(childNode);
this.RegisterChildForSearch(childNode);
return childNode;
}
public override string ToString()
{
return Data != null ? Data.ToString() : "[data null]";
}
#region searching
private ICollection<TreeNode<T>> ElementsIndex { get; set; }
private void RegisterChildForSearch(TreeNode<T> node)
{
ElementsIndex.Add(node);
if (Parent != null)
Parent.RegisterChildForSearch(node);
}
public TreeNode<T> FindTreeNode(Func<TreeNode<T>, bool> predicate)
{
return this.ElementsIndex.FirstOrDefault(predicate);
}
#endregion
#region iterating
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
public IEnumerator<TreeNode<T>> GetEnumerator()
{
yield return this;
foreach (var directChild in this.Children)
{
foreach (var anyChild in directChild)
yield return anyChild;
}
}
#endregion
}
}
================================================
FILE: csharp/CSharpTree.sln
================================================
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpTree", "CSharpTree\CSharpTree.csproj", "{4F3E0879-E048-4D79-B2D0-F9D8A5218F8A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4F3E0879-E048-4D79-B2D0-F9D8A5218F8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4F3E0879-E048-4D79-B2D0-F9D8A5218F8A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4F3E0879-E048-4D79-B2D0-F9D8A5218F8A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4F3E0879-E048-4D79-B2D0-F9D8A5218F8A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
================================================
FILE: java/.classpath
================================================
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="output" path="bin"/>
</classpath>
================================================
FILE: java/.project
================================================
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>yet-another-tree-structure</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
================================================
FILE: java/.settings/org.eclipse.jdt.core.prefs
================================================
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
================================================
FILE: java/src/com/tree/SampleData.java
================================================
package com.tree;
class SampleData {
public static TreeNode<String> getSet1() {
TreeNode<String> root = new TreeNode<String>("root");
{
TreeNode<String> node0 = root.addChild("node0");
TreeNode<String> node1 = root.addChild("node1");
TreeNode<String> node2 = root.addChild("node2");
{
TreeNode<String> node20 = node2.addChild(null);
TreeNode<String> node21 = node2.addChild("node21");
{
TreeNode<String> node210 = node21.addChild("node210");
TreeNode<String> node211 = node21.addChild("node211");
}
}
TreeNode<String> node3 = root.addChild("node3");
{
TreeNode<String> node30 = node3.addChild("node30");
}
}
return root;
}
public static TreeNode<String> getSetSOF() {
TreeNode<String> root = new TreeNode<String>("root");
{
TreeNode<String> node0 = root.addChild("node0");
TreeNode<String> node1 = root.addChild("node1");
TreeNode<String> node2 = root.addChild("node2");
{
TreeNode<String> node20 = node2.addChild(null);
TreeNode<String> node21 = node2.addChild("node21");
{
TreeNode<String> node210 = node20.addChild("node210");
}
}
}
return root;
}
}
================================================
FILE: java/src/com/tree/SampleIterating.java
================================================
package com.tree;
class SampleIterating {
public static void main(String[] args) {
TreeNode<String> treeRoot = SampleData.getSet1();
for (TreeNode<String> node : treeRoot) {
String indent = createIndent(node.getLevel());
System.out.println(indent + node.data);
}
}
private static String createIndent(int depth) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < depth; i++) {
sb.append(' ');
}
return sb.toString();
}
}
================================================
FILE: java/src/com/tree/SampleSearching.java
================================================
package com.tree;
class SampleSearching {
public static void main(String[] args) {
Comparable<String> searchCriteria = new Comparable<String>() {
@Override
public int compareTo(String treeData) {
if (treeData == null)
return 1;
boolean nodeOk = treeData.contains("210");
return nodeOk ? 0 : 1;
}
};
TreeNode<String> treeRoot = SampleData.getSet1();
TreeNode<String> found = treeRoot.findTreeNode(searchCriteria);
System.out.println("Found: " + found);
}
}
================================================
FILE: java/src/com/tree/TreeNode.java
================================================
package com.tree;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
public class TreeNode<T> implements Iterable<TreeNode<T>> {
public T data;
public TreeNode<T> parent;
public List<TreeNode<T>> children;
public boolean isRoot() {
return parent == null;
}
public boolean isLeaf() {
return children.size() == 0;
}
private List<TreeNode<T>> elementsIndex;
public TreeNode(T data) {
this.data = data;
this.children = new LinkedList<TreeNode<T>>();
this.elementsIndex = new LinkedList<TreeNode<T>>();
this.elementsIndex.add(this);
}
public TreeNode<T> addChild(T child) {
TreeNode<T> childNode = new TreeNode<T>(child);
childNode.parent = this;
this.children.add(childNode);
this.registerChildForSearch(childNode);
return childNode;
}
public int getLevel() {
if (this.isRoot())
return 0;
else
return parent.getLevel() + 1;
}
private void registerChildForSearch(TreeNode<T> node) {
elementsIndex.add(node);
if (parent != null)
parent.registerChildForSearch(node);
}
public TreeNode<T> findTreeNode(Comparable<T> cmp) {
for (TreeNode<T> element : this.elementsIndex) {
T elData = element.data;
if (cmp.compareTo(elData) == 0)
return element;
}
return null;
}
@Override
public String toString() {
return data != null ? data.toString() : "[data null]";
}
@Override
public Iterator<TreeNode<T>> iterator() {
TreeNodeIter<T> iter = new TreeNodeIter<T>(this);
return iter;
}
}
================================================
FILE: java/src/com/tree/TreeNodeIter.java
================================================
package com.tree;
import java.util.Iterator;
public class TreeNodeIter<T> implements Iterator<TreeNode<T>> {
enum ProcessStages {
ProcessParent, ProcessChildCurNode, ProcessChildSubNode
}
private TreeNode<T> treeNode;
public TreeNodeIter(TreeNode<T> treeNode) {
this.treeNode = treeNode;
this.doNext = ProcessStages.ProcessParent;
this.childrenCurNodeIter = treeNode.children.iterator();
}
private ProcessStages doNext;
private TreeNode<T> next;
private Iterator<TreeNode<T>> childrenCurNodeIter;
private Iterator<TreeNode<T>> childrenSubNodeIter;
@Override
public boolean hasNext() {
if (this.doNext == ProcessStages.ProcessParent) {
this.next = this.treeNode;
this.doNext = ProcessStages.ProcessChildCurNode;
return true;
}
if (this.doNext == ProcessStages.ProcessChildCurNode) {
if (childrenCurNodeIter.hasNext()) {
TreeNode<T> childDirect = childrenCurNodeIter.next();
childrenSubNodeIter = childDirect.iterator();
this.doNext = ProcessStages.ProcessChildSubNode;
return hasNext();
}
else {
this.doNext = null;
return false;
}
}
if (this.doNext == ProcessStages.ProcessChildSubNode) {
if (childrenSubNodeIter.hasNext()) {
this.next = childrenSubNodeIter.next();
return true;
}
else {
this.next = null;
this.doNext = ProcessStages.ProcessChildCurNode;
return hasNext();
}
}
return false;
}
@Override
public TreeNode<T> next() {
return this.next;
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
}
gitextract_q36xmw2f/
├── README.md
├── csharp/
│ ├── CSharpTree/
│ │ ├── App.config
│ │ ├── CSharpTree.csproj
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ ├── SampleData.cs
│ │ ├── SampleIterating.cs
│ │ ├── SampleSearching.cs
│ │ └── TreeNode.cs
│ └── CSharpTree.sln
└── java/
├── .classpath
├── .project
├── .settings/
│ └── org.eclipse.jdt.core.prefs
└── src/
└── com/
└── tree/
├── SampleData.java
├── SampleIterating.java
├── SampleSearching.java
├── TreeNode.java
└── TreeNodeIter.java
SYMBOL INDEX (39 symbols across 9 files)
FILE: csharp/CSharpTree/SampleData.cs
class SampleData (line 3) | class SampleData
method GetSet1 (line 5) | public static TreeNode<string> GetSet1()
FILE: csharp/CSharpTree/SampleIterating.cs
class SampleIterating (line 6) | class SampleIterating
method MainTest (line 8) | static void MainTest(string[] args)
method CreateIndent (line 18) | private static String CreateIndent(int depth)
FILE: csharp/CSharpTree/SampleSearching.cs
class SampleSearching (line 5) | class SampleSearching
method Main (line 7) | static void Main(string[] args)
FILE: csharp/CSharpTree/TreeNode.cs
class TreeNode (line 8) | public class TreeNode<T> : IEnumerable<TreeNode<T>>
method TreeNode (line 36) | public TreeNode(T data)
method AddChild (line 45) | public TreeNode<T> AddChild(T child)
method ToString (line 55) | public override string ToString()
method RegisterChildForSearch (line 65) | private void RegisterChildForSearch(TreeNode<T> node)
method FindTreeNode (line 72) | public TreeNode<T> FindTreeNode(Func<TreeNode<T>, bool> predicate)
method GetEnumerator (line 82) | IEnumerator IEnumerable.GetEnumerator()
method GetEnumerator (line 87) | public IEnumerator<TreeNode<T>> GetEnumerator()
FILE: java/src/com/tree/SampleData.java
class SampleData (line 3) | class SampleData {
method getSet1 (line 5) | public static TreeNode<String> getSet1() {
method getSetSOF (line 28) | public static TreeNode<String> getSetSOF() {
FILE: java/src/com/tree/SampleIterating.java
class SampleIterating (line 3) | class SampleIterating {
method main (line 5) | public static void main(String[] args) {
method createIndent (line 13) | private static String createIndent(int depth) {
FILE: java/src/com/tree/SampleSearching.java
class SampleSearching (line 3) | class SampleSearching {
method main (line 5) | public static void main(String[] args) {
FILE: java/src/com/tree/TreeNode.java
class TreeNode (line 7) | public class TreeNode<T> implements Iterable<TreeNode<T>> {
method isRoot (line 13) | public boolean isRoot() {
method isLeaf (line 17) | public boolean isLeaf() {
method TreeNode (line 23) | public TreeNode(T data) {
method addChild (line 30) | public TreeNode<T> addChild(T child) {
method getLevel (line 38) | public int getLevel() {
method registerChildForSearch (line 45) | private void registerChildForSearch(TreeNode<T> node) {
method findTreeNode (line 51) | public TreeNode<T> findTreeNode(Comparable<T> cmp) {
method toString (line 61) | @Override
method iterator (line 66) | @Override
FILE: java/src/com/tree/TreeNodeIter.java
class TreeNodeIter (line 5) | public class TreeNodeIter<T> implements Iterator<TreeNode<T>> {
type ProcessStages (line 7) | enum ProcessStages {
method TreeNodeIter (line 13) | public TreeNodeIter(TreeNode<T> treeNode) {
method hasNext (line 24) | @Override
method next (line 62) | @Override
method remove (line 67) | @Override
Condensed preview — 17 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (19K chars).
[
{
"path": "README.md",
"chars": 28,
"preview": "# yet-another-tree-structure"
},
{
"path": "csharp/CSharpTree/App.config",
"chars": 185,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n<configuration>\r\n <startup> \r\n <supportedRuntime version=\"v4.0\" sku="
},
{
"path": "csharp/CSharpTree/CSharpTree.csproj",
"chars": 2693,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.micros"
},
{
"path": "csharp/CSharpTree/Properties/AssemblyInfo.cs",
"chars": 1429,
"preview": "using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General I"
},
{
"path": "csharp/CSharpTree/SampleData.cs",
"chars": 1023,
"preview": "namespace CSharpTree\r\n{\r\n class SampleData\r\n {\r\n public static TreeNode<string> GetSet1()\r\n {\r\n "
},
{
"path": "csharp/CSharpTree/SampleIterating.cs",
"chars": 726,
"preview": "using System;\r\nusing System.Text;\r\n\r\nnamespace CSharpTree\r\n{\r\n class SampleIterating\r\n {\r\n static void Mai"
},
{
"path": "csharp/CSharpTree/SampleSearching.cs",
"chars": 383,
"preview": "using System;\r\n\r\nnamespace CSharpTree\r\n{\r\n class SampleSearching\r\n {\r\n static void Main(string[] args)\r\n "
},
{
"path": "csharp/CSharpTree/TreeNode.cs",
"chars": 2413,
"preview": "using System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\n\r\nnamespace CSharpTree"
},
{
"path": "csharp/CSharpTree.sln",
"chars": 918,
"preview": "\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 2012\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-"
},
{
"path": "java/.classpath",
"chars": 301,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<classpath>\r\n\t<classpathentry kind=\"src\" path=\"src\"/>\r\n\t<classpathentry kind=\"co"
},
{
"path": "java/.project",
"chars": 402,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<projectDescription>\r\n\t<name>yet-another-tree-structure</name>\r\n\t<comment></comm"
},
{
"path": "java/.settings/org.eclipse.jdt.core.prefs",
"chars": 598,
"preview": "eclipse.preferences.version=1\r\norg.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled\r\norg.eclipse.jdt.core.com"
},
{
"path": "java/src/com/tree/SampleData.java",
"chars": 1211,
"preview": "package com.tree;\r\n\r\nclass SampleData {\r\n\r\n\tpublic static TreeNode<String> getSet1() {\r\n\t\tTreeNode<String> root = new Tr"
},
{
"path": "java/src/com/tree/SampleIterating.java",
"chars": 481,
"preview": "package com.tree;\r\n\r\nclass SampleIterating {\r\n\r\n\tpublic static void main(String[] args) {\r\n\t\tTreeNode<String> treeRoot ="
},
{
"path": "java/src/com/tree/SampleSearching.java",
"chars": 523,
"preview": "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> sear"
},
{
"path": "java/src/com/tree/TreeNode.java",
"chars": 1567,
"preview": "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 Tr"
},
{
"path": "java/src/com/tree/TreeNodeIter.java",
"chars": 1641,
"preview": "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\te"
}
]
About this extraction
This page contains the full source code of the gt4dev/yet-another-tree-structure GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 17 files (16.1 KB), approximately 4.5k tokens, and a symbol index with 39 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.