{"id":36594918,"url":"https://github.com/tinyield/jayield","last_synced_at":"2026-01-12T08:27:21.322Z","repository":{"id":56620394,"uuid":"93849206","full_name":"tinyield/jayield","owner":"tinyield","description":"JAYield - Java yield like generator","archived":false,"fork":false,"pushed_at":"2020-12-29T13:33:56.000Z","size":613,"stargazers_count":11,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-29T04:58:38.437Z","etag":null,"topics":[],"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/tinyield.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":"2017-06-09T10:45:24.000Z","updated_at":"2024-01-13T23:56:51.000Z","dependencies_parsed_at":"2022-08-15T22:01:12.801Z","dependency_job_id":null,"html_url":"https://github.com/tinyield/jayield","commit_stats":null,"previous_names":["jayield/jayield"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/tinyield/jayield","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyield%2Fjayield","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyield%2Fjayield/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyield%2Fjayield/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyield%2Fjayield/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinyield","download_url":"https://codeload.github.com/tinyield/jayield/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyield%2Fjayield/sbom","scorecard":{"id":509009,"data":{"date":"2025-08-11","repo":{"name":"github.com/tinyield/jayield","commit":"3e86c08e64e8227a3b68d350f6e5886d1a0d9ec0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T00:02:39.642Z","repository_id":56620394,"created_at":"2025-08-20T00:02:39.642Z","updated_at":"2025-08-20T00:02:39.642Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2026-01-12T08:27:20.731Z","updated_at":"2026-01-12T08:27:21.317Z","avatar_url":"https://github.com/tinyield.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JAYield\n\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=com.tinyield%3Ajayield\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=com.tinyield%3Ajayield)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=com.tinyield%3Ajayield\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=com.tinyield%3Ajayield)\n[![Maven Central](https://img.shields.io/maven-central/v/com.tinyield/jayield)](https://search.maven.org/artifact/com.tinyield/jayield)\n\n_Minimalistic_, _extensible_, _non-parallel_ and _lazy_ sequence implementation interoperable with Java\n`Stream` (`toStream` and `fromStream`), which provides an idiomatic `yield` like _generator_.\n\nJAYield `Query` provides similar operations to Java `Stream`, or\n[jOOλ][18] `Seq`, or [StreamEx][16], or [Vavr][19] Stream. \nYet, `Query` is **extensible** and its methods can be [chained\nfluently](#extensibility-and-chaining) with new operations in a pipeline.\nFurthermore, `Query` has lower per-element access cost and offers an optimized\nfast-path traversal, which presents better sequential processing performance in\nsome benchmarks, such as [sequences-benchmarks][20] and [jayield-jmh][21].\n\nThe core API of `Query` provides well-known query methods that can be \ncomposed fluently (_pipeline_), e.g.:\n\n```java\n// pipeline: iterate-filter-map-limit-forEach\n//\nQuery.iterate('a', prev -\u003e (char) ++prev).filter(n -\u003e n%2 != 0).map(Object::toString).limit(10).forEach(out::println);\n```\n\n\n## Extensibility and chaining\n\nNotice how it looks a JAYield custom `collapse()` method that merges series of adjacent elements.\nIt has a similar shape to that one written in any language providing the `yield` feature\nsuch as Kotlin.\n\n\u003ctable class=\"table\"\u003e\n    \u003ctr class=\"row\"\u003e\n        \u003ctd\u003e\n\n```java\nclass Queries {\n  private U prev = null;\n  \u003cU\u003e Traverser\u003cU\u003e  collapse(Query\u003cU\u003e src) {\n    return yield -\u003e {\n      src.traverse(item -\u003e {\n        if (prev == null || !prev.equals(item))\n        yield.ret(prev = item);\n      });\n    };\n  }\n}\n```\n\n\u003c/td\u003e\n\u003ctd\u003e\n\n```kotlin\nfun \u003cT\u003e Sequence\u003cT\u003e.collapse() = sequence {\n    var prev: T? = null\n    val src = this@collapse.iterator()\n    while (src.hasNext()) {\n        val aux = src.next()\n        if (aux != null \u0026\u0026 aux != prev) {\n            prev = aux\n            yield(aux)\n        }\n    }\n}\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\nThese methods can be chained in queries, such as:\n\n\u003ctable class=\"table\"\u003e\n    \u003ctr class=\"row\"\u003e\n        \u003ctd\u003e\n\n```java\nQuery\n    .of(7, 7, 8, 9, 9, 8, 11, 11, 9, 7)\n    .then(new Queries()::collapse)\n    .filter(n -\u003e n%2 != 0)\n    .map(Object::toString)\n    .traverse(out::println);\n\n```\n\n\u003c/td\u003e\n\u003ctd\u003e\n\n```kotlin\nsequenceOf(7, 7, 8, 9, 9, 8, 11, 11, 9, 7)\n    .collapse()\n    .filter { it % 2 != 0 }\n    .map(Int::toString)\n    .forEach(::println)\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## Internals Overview\n\n`Traverser` is the primary choice for traversing the `Query` elements in bulk and \nsupports all its methods including _terminal_, _intermediate_ and _short-circuting_\noperations.\nTo that end, the traversal's consumer - `Yield` - provides one method to return\nan element (`ret`) and other to finish the iteration (`bye`).\n`Advancer` is the alternative iterator of `Query` that provides individually traversal.\n\n\u003cimg src=\"assets/jayield-yuml.svg\" width=\"600px\"\u003e\n\n## Installation\n\nIn order to include it to your Maven project, simply add this dependency:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.tinyield\u003c/groupId\u003e\n    \u003cartifactId\u003ejayield\u003c/artifactId\u003e\n    \u003cversion\u003e1.5.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nYou can also download the artifact directly from [Maven\nCentral Repository](https://repo.maven.apache.org/maven2/com/tinyield/jayield/)\n\n\n## License\n\nThis project is licensed under [Apache License,\nversion 2.0](https://www.apache.org/licenses/LICENSE-2.0)\n\n[16]: https://github.com/amaembo/streamex\n[18]: https://github.com/jOOQ/jOOL\n[19]: https://github.com/vavr-io/vavr\n[20]: https://github.com/tinyield/sequences-benchmarks\n[21]: https://github.com/jayield/jayield-jmh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinyield%2Fjayield","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinyield%2Fjayield","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinyield%2Fjayield/lists"}