{"id":20509336,"url":"https://github.com/raydac/mi-stack","last_synced_at":"2025-10-06T00:48:18.529Z","repository":{"id":65507819,"uuid":"485090127","full_name":"raydac/mi-stack","owner":"raydac","description":"Yet another stack","archived":false,"fork":false,"pushed_at":"2025-06-13T10:17:30.000Z","size":207,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-13T11:26:58.310Z","etag":null,"topics":["stack","utility-library"],"latest_commit_sha":null,"homepage":"","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/raydac.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.txt","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}},"created_at":"2022-04-24T17:11:46.000Z","updated_at":"2025-06-13T10:17:33.000Z","dependencies_parsed_at":"2024-04-15T11:39:06.230Z","dependency_job_id":"0e6b5347-25e8-4f3b-948b-d7b80073c622","html_url":"https://github.com/raydac/mi-stack","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/raydac/mi-stack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raydac%2Fmi-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raydac%2Fmi-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raydac%2Fmi-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raydac%2Fmi-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raydac","download_url":"https://codeload.github.com/raydac/mi-stack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raydac%2Fmi-stack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278542685,"owners_count":26004061,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["stack","utility-library"],"created_at":"2024-11-15T20:24:05.249Z","updated_at":"2025-10-06T00:48:18.524Z","avatar_url":"https://github.com/raydac.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Mi-Stack logo](assets/logo.png)\n\n[![License Apache 2.0](https://img.shields.io/badge/license-Apache%20License%202.0-green.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n[![Java 11.0+](https://img.shields.io/badge/java-11.0%2b-green.svg)](http://www.oracle.com/technetwork/java/javase/downloads/index.html)\n[![Maven central](https://maven-badges.herokuapp.com/maven-central/com.igormaznitsa/mi-stack/badge.svg)](http://search.maven.org/#artifactdetails|com.igormaznitsa|mi-stack|2.0.0|jar)   \n[![Arthur's acres sanctuary donation](assets/arthur_sanctuary_banner.png)](https://www.arthursacresanimalsanctuary.org/donate)\n\n# Changelog\n\n__2.0.0 (15-jun-2025)__\n  - improved generics for more flexible object processing\n\n__1.0.3 (18-aug-2024)__\n  - fix and test improvements\n\n\n# What is it?\n\nJust abstract stack allows to mark its items by tags and get elements through either stream or iterator with possibility to filter items and stop iterator.\n\n# Implementations\n\n## Thread unsafe\n\n - __MiStackArray__, based on dynamically growing array, also growing can be disabled and in the case it works with internal fixed size array. \n - __MiStackArrayList__, based on java.util.ArrayList. \n - __MiStackLinked__, it uses own internal implementation of linked list. \n - __MiStackLinkedList__, based on java.util.LinkedList. \n\n## Thread safe\n\n - __MiStackConcurrent__, it uses as base _java.util.concurrent.ConcurrentLinkedDeque_.\n\n## Abstract ones\n\n - __AbstractMiStackList__, it allows build MiStack implementation around a _java.util.List_ collection.\n - __AbstractMiStackDeque__, it allows build MiStack implementation around a _java.util.Deque_ collection.\n\n# Use with Maven\n\nJust add the snippet into the list of dependencies\n\n```xml\n\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.igormaznitsa\u003c/groupId\u003e\n    \u003cartifactId\u003emi-stack\u003c/artifactId\u003e\n    \u003cversion\u003e2.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n# Example\n\nThe example below shows minimal use case with pushing several tagged items on the stack and iteration through them with\npredicated streams.\n\n```java\n    var tagStar = MiStackTagImpl.tagsOf(\"star\");\n    var tagPlanet = MiStackTagImpl.tagsOf(\"planet\");\n    var tagPlanetoids = MiStackTagImpl.tagsOf(\"planetoids\");\n    var tagAsteroid = MiStackTagImpl.tagsOf(\"asteroid\");\n    var tagSatellite = MiStackTagImpl.tagsOf(\"satellite\");\n\n    try (var stack = new MiStackArrayList\u003c\u003e()) {\n      stack.push(MiStackItemImpl.itemOf(\"Sun\", tagStar));\n      stack.push(MiStackItemImpl.itemOf(\"Mercury\", tagPlanet));\n      stack.push(MiStackItemImpl.itemOf(\"Venus\", tagPlanet, tagSatellite));\n      stack.push(MiStackItemImpl.itemOf(\"Earth\", tagPlanet, tagSatellite));\n      stack.push(MiStackItemImpl.itemOf(\"Moon\", tagPlanetoids, tagSatellite));\n      stack.push(MiStackItemImpl.itemOf(\"Mars\", tagPlanet));\n      stack.push(MiStackItemImpl.itemOf(\"Phobos\", tagAsteroid, tagSatellite));\n      stack.push(MiStackItemImpl.itemOf(\"Demos\", tagAsteroid, tagSatellite));\n      stack.push(MiStackItemImpl.itemOf(\"Jupiter\", tagPlanet));\n      stack.push(MiStackItemImpl.itemOf(\"Saturn\", tagPlanet));\n      stack.push(MiStackItemImpl.itemOf(\"Uranus\", tagPlanet));\n      stack.push(MiStackItemImpl.itemOf(\"Neptune\", tagPlanet));\n      stack.push(MiStackItemImpl.itemOf(\"Pluto\", tagPlanetoids));\n      assertArrayEquals(new Object[] {\"Sun\"}, stack.stream(MiStack.allTags(tagStar)).map(MiStackItem::getValue).toArray());\n      assertArrayEquals(new Object[] {\"Pluto\", \"Moon\"},stack.stream(MiStack.allTags(tagPlanetoids)).map(MiStackItem::getValue).toArray());\n      assertArrayEquals(new Object[] {\"Neptune\", \"Uranus\", \"Saturn\", \"Jupiter\", \"Mars\", \"Earth\", \"Venus\",\"Mercury\"}, stack.stream(MiStack.allTags(tagPlanet)).map(MiStackItem::getValue).toArray());\n      assertArrayEquals(new Object[] {\"Pluto\", \"Neptune\", \"Uranus\", \"Saturn\", \"Jupiter\", \"Mars\", \"Moon\", \"Earth\", \"Venus\", \"Mercury\"},stack.stream(MiStack.anyTag(tagPlanet, tagPlanetoids)).map(MiStackItem::getValue).toArray());\n    }\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraydac%2Fmi-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraydac%2Fmi-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraydac%2Fmi-stack/lists"}