{"id":21296931,"url":"https://github.com/reddec/microtable","last_synced_at":"2025-03-15T17:27:42.128Z","repository":{"id":81702530,"uuid":"16828805","full_name":"reddec/microtable","owner":"reddec","description":"Java simple table class","archived":false,"fork":false,"pushed_at":"2014-02-16T19:13:19.000Z","size":160,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-09T00:06:39.111Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reddec.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":"2014-02-14T06:11:20.000Z","updated_at":"2014-02-16T19:13:21.000Z","dependencies_parsed_at":"2023-02-28T02:46:29.470Z","dependency_job_id":null,"html_url":"https://github.com/reddec/microtable","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/reddec%2Fmicrotable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fmicrotable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fmicrotable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fmicrotable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reddec","download_url":"https://codeload.github.com/reddec/microtable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243765024,"owners_count":20344522,"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":[],"created_at":"2024-11-21T14:31:07.664Z","updated_at":"2025-03-15T17:27:42.101Z","avatar_url":"https://github.com/reddec.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"microtable\n==========\n\nJava simple table class. \nCurrent implementation much faster for operations with rows, not columns\n\n## Features \n\n- Add / Remove / Move columns and rows\n- Get / Set cells values\n- Based on template\n- Rotate table (columns becomes rows)\n- Get rows and columns\n\n## Simple and documented API\n- Table class implements interface, so somebody can change implementation\n- Each function in interface is documented\n\n## Usage\nUse import\n```java\nimport org.reddec.microtable.Table;\n```\n\n#### Indexes\nAccess cell by row and column (i,j)\n```java\nint i,j;\ntable.setCell(i,j, \u003cvalue\u003e );\n```\n   |  0  |  1  | ... | N\n---| --- | --- | --- | ---\n **0** |     |     |     | \n **1** |     |     |     |\n    ...|     |     |     |\n **M** |     |     |     |\n\n```i = 0 .. M```\n```j = 0 .. N```\n\n#### Rows\nGet row\n\n```java\nList row = table.getRow(1)\n```\n   |  0  |  1  | ... | N\n---| --- | --- | --- | ---\n **0** |  a0 |  a1 | ... | aN\n **1** |  b0 |  b1 | ... | bN\n...| ... | ... | ... | ...\n\n```row``` will be\n\n   |     |     |     | \n---| --- | --- | --- |\n b0|  b1 | ... | bN  |\n \n \n#### Columns \nGet column\n\n\n```java\nList column = table.getColumn(1)\n```\n   |  0  |  1  | ... | N\n---| --- | --- | --- | ---\n **0** |  a0 |  a1 | ... | aN\n **1** |  b0 |  b1 | ... | bN\n...| ... | ... | ... | ...\n\n```column``` will be\n\n   |     |     |\n---| --- | --- |\n a1|  b1 | ... |\n\n\n## Examples\n\n#### Create table with string cells\n```java\nTable\u003cString\u003e table = new Table\u003cString\u003e();\n```\n#### Add 3 columns\n```java\nTable\u003cString\u003e table = new Table\u003cString\u003e();\ntable.addColumns(3);\n```\nor with default value \"Spam\" for each new cell\n```java\ntable.addColumns(3,\"Spam\");\n```\n\n#### Table 3x3 with default value \"Foo\"\n```java\nTable\u003cString\u003e table = new Table\u003cString\u003e();\ntable.addColumns(3);\ntable.addRows(3, \"Foo\");\n```\n|     |     |     |\n| --- | --- | --- |\n| Foo | Foo | Foo |\n| Foo | Foo | Foo |\n| Foo | Foo | Foo |\n\n#### Table 3x3 with custom values\n```java\nTable\u003cString\u003e table = new Table\u003cString\u003e();\ntable.addColumns(3);\ntable.addRows(3, \"Foo\");\ntable.setCell(0,2,\"TOP\");\ntable.setCell(2,0,\"BOT\");\n```\n|     |     |     |\n| --- | --- | --- |\n| Foo | Foo | **TOP** |\n| Foo | Foo | Foo |\n| **BOT** | Foo | Foo |\n\n#### Table 3x5. Custom values and rotate\n```java\nTable\u003cString\u003e table = new Table\u003cString\u003e();\ntable.addColumns(5);\ntable.addRows(3, \"Foo\");\ntable.setCell(0,4,\"TOP\");\ntable.setCell(2,0,\"BOT\");\n\nTable\u003cString\u003e table_rotated = table.rotateTable();\n```\nSource ```table```\n\n|         |     |     |     |         |\n| ------- | --- | --- | --- | ------- |\n| Foo     | Foo | Foo | Foo | **TOP** |\n| Foo     | Foo | Foo | Foo | Foo     |\n| **BOT** | Foo | Foo | Foo | Foo     | \n\n\nRotated ```table_rotated```\n\n|          |     |         |\n| -------- | --- | ------- |\n| **BOT*** | Foo | Foo     |\n| Foo      | Foo | Foo     |\n| Foo      | Foo | Foo     |\n| Foo      | Foo | Foo     |\n| Foo      | Foo | **TOP** |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddec%2Fmicrotable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freddec%2Fmicrotable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddec%2Fmicrotable/lists"}