{"id":15044487,"url":"https://github.com/skozlov/jadt","last_synced_at":"2026-01-31T04:32:39.498Z","repository":{"id":57722853,"uuid":"168837610","full_name":"skozlov/jadt","owner":"skozlov","description":"Basic ADT interfaces for Java","archived":false,"fork":false,"pushed_at":"2019-02-06T16:59:03.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-09T14:29:05.830Z","etag":null,"topics":["adt","java","java8"],"latest_commit_sha":null,"homepage":"https://skozlov.github.io/jadt/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skozlov.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}},"created_at":"2019-02-02T14:02:44.000Z","updated_at":"2019-02-06T16:58:56.000Z","dependencies_parsed_at":"2022-09-26T21:50:16.510Z","dependency_job_id":null,"html_url":"https://github.com/skozlov/jadt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/skozlov/jadt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skozlov%2Fjadt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skozlov%2Fjadt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skozlov%2Fjadt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skozlov%2Fjadt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skozlov","download_url":"https://codeload.github.com/skozlov/jadt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skozlov%2Fjadt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28929701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T04:05:25.756Z","status":"ssl_error","status_checked_at":"2026-01-31T04:02:35.005Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["adt","java","java8"],"created_at":"2024-09-24T20:50:38.712Z","updated_at":"2026-01-31T04:32:39.481Z","avatar_url":"https://github.com/skozlov.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jADT\n\nBasic ADT interfaces for Java.\n\n## Usage\n\nAdd maven dependency:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.skozlov\u003c/groupId\u003e\n    \u003cartifactId\u003ejadt\u003c/artifactId\u003e\n    \u003cversion\u003e0.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nThen implement your ADT:\n\n```java\npackage com.github.skozlov.jadt.demo;\n\nimport com.github.skozlov.jadt.ADT2;\n\nabstract class Person implements ADT2\u003cPerson, Person.Bro, Person.NotBro\u003e {\n\tprivate Person(){}\n\n\t@Override\n\tpublic Class\u003cBro\u003e getSubtype1() {\n\t\treturn Bro.class;\n\t}\n\n\t@Override\n\tpublic Class\u003cNotBro\u003e getSubtype2() {\n\t\treturn NotBro.class;\n\t}\n\n\tstatic final class Bro extends Person{\n\t\tfinal String name;\n\n\t\tBro(String name) {\n\t\t\tthis.name = name;\n\t\t}\n\n\t}\n\n\tstatic final class NotBro extends Person{\n\t}\n}\n```\n\nEnjoy using it:\n\n```java\npackage com.github.skozlov.jadt.demo;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tsayHello(new Person.Bro(\"John\"));// prints \"Hi John!\"\n\t\tsayHello(new Person.NotBro());//prints \"You're not my bro.\"\n\t}\n\n\tprivate static void sayHello(Person person){\n\t\tperson.forEach(\n\t\t\tbro -\u003e {\n\t\t\t\tSystem.out.printf(\"Hi %s!\", bro.name);\n\t\t\t\tSystem.out.println();\n\t\t\t},\n\t\t\tnotBro -\u003e System.out.println(\"You're not my bro.\")\n\t\t);\n\t}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskozlov%2Fjadt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskozlov%2Fjadt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskozlov%2Fjadt/lists"}