{"id":17908818,"url":"https://github.com/ignatiusmb/treevisualizer","last_synced_at":"2025-04-03T06:23:44.676Z","repository":{"id":115458048,"uuid":"158963987","full_name":"ignatiusmb/TreeVisualizer","owner":"ignatiusmb","description":"Visualizer for binary tree data structure in Java.","archived":false,"fork":false,"pushed_at":"2019-08-03T07:34:34.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-08T20:17:11.740Z","etag":null,"topics":["binary-search-tree","data-structures","java","tree","visualizer"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ignatiusmb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-24T18:42:37.000Z","updated_at":"2021-05-20T19:40:24.000Z","dependencies_parsed_at":"2023-03-29T06:01:24.744Z","dependency_job_id":null,"html_url":"https://github.com/ignatiusmb/TreeVisualizer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignatiusmb%2FTreeVisualizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignatiusmb%2FTreeVisualizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignatiusmb%2FTreeVisualizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignatiusmb%2FTreeVisualizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ignatiusmb","download_url":"https://codeload.github.com/ignatiusmb/TreeVisualizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246945596,"owners_count":20858989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary-search-tree","data-structures","java","tree","visualizer"],"created_at":"2024-10-28T19:18:03.532Z","updated_at":"2025-04-03T06:23:44.644Z","avatar_url":"https://github.com/ignatiusmb.png","language":"Java","readme":"# TreeVisualizer\nA simple program to print all the nodes in the tree with a beautiful output. Connected by lines with clear paths, it's nice to look and easy to debug a tree.\n\n## Getting Started\nDownload `TreeVisualizer.java` and put it in the same directory so you won't need to import anything\n\n## Usage\n1. Put `TreeVisualizer.java` in the same directory with the `Node` file (to implement) and `Tree` file (to print)\n2. Implements `Visualized` from `TreeVisualizer` to your `Node` class\n3. Override `getLeft`, `getRight`, and `getValue` method with your values\n```java\nclass Node implements TreeVisualizer.Visualized {\n  Node left, right;\n  String name;\n  \n  ...\n  \n  @Override\n  public TreeVisualizer.Visualized getLeft() {\n      return this.left;\n  }\n\n  @Override\n  public TreeVisualizer.Visualized getRight() {\n      return this.right;\n  }\n\n  @Override\n  public String getValue() {\n      return this.name;\n  }\n}\n```\n4. If your `Value` is other than a `String`, you need to modify it to return your data type\n5. Use the provided `print` method and put the tree's `root` as the argument\n```java\npublic class MyFile {\n  public static void main(String[] args) {\n    Tree tree = new Tree();\n    TreeVisualizer.print(tree.root);\n  }\n}\n```\n**or**\n```java\npublic class MyFile {\n  public static void main(String[] args) {\n    Tree tree = new Tree();\n    tree.print()\n  }\n}\n\nclass Tree {\n  Node root;\n  \n  ...\n  \n  public void print() {\n    TreeVisualizer.print(this.root);\n  }\n}\n```\n\n---\n\n\u003ch3 align=\"center\"\u003e\nTreeVisualizer is \u003ca href=LICENSE\u003eUnlicensed\u003c/a\u003e\n\u003c/h3\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://ignatiusmb.github.io\"\u003eignatiusmb.io\u003c/a\u003e\n  \u0026middot;\n  \u003ca href=\"https://github.com/ignatiusmb\"\u003eGitHub\u003c/a\u003e\n  \u0026middot;\n  \u003ca href=\"https://gitlab.com/ignatiusmb\"\u003eGitLab\u003c/a\u003e\n\u003c/p\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fignatiusmb%2Ftreevisualizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fignatiusmb%2Ftreevisualizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fignatiusmb%2Ftreevisualizer/lists"}