{"id":20741111,"url":"https://github.com/robtimus/iterator-utils","last_synced_at":"2025-09-27T18:31:18.562Z","repository":{"id":118272596,"uuid":"583427829","full_name":"robtimus/iterator-utils","owner":"robtimus","description":"Provides classes and interfaces to help implement iterators","archived":false,"fork":false,"pushed_at":"2024-01-25T18:57:05.000Z","size":437,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-17T06:41:41.567Z","etag":null,"topics":["iterators","java"],"latest_commit_sha":null,"homepage":"https://robtimus.github.io/iterator-utils/","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/robtimus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2022-12-29T18:45:46.000Z","updated_at":"2022-12-30T14:28:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c16b2fc-db61-4635-85ca-d0359d6c8945","html_url":"https://github.com/robtimus/iterator-utils","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/robtimus%2Fiterator-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fiterator-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fiterator-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fiterator-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robtimus","download_url":"https://codeload.github.com/robtimus/iterator-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234452031,"owners_count":18834739,"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":["iterators","java"],"created_at":"2024-11-17T06:33:52.805Z","updated_at":"2025-09-27T18:31:13.292Z","avatar_url":"https://github.com/robtimus.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iterator-utils\n\u003c!--[![Maven Central](https://img.shields.io/maven-central/v/com.github.robtimus/iterator-utils)](https://search.maven.org/artifact/com.github.robtimus/iterator-utils)--\u003e\n[![Build Status](https://github.com/robtimus/iterator-utils/actions/workflows/build.yml/badge.svg)](https://github.com/robtimus/iterator-utils/actions/workflows/build.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=com.github.robtimus%3Aiterator-utils\u0026metric=alert_status)](https://sonarcloud.io/summary/overall?id=com.github.robtimus%3Aiterator-utils)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=com.github.robtimus%3Aiterator-utils\u0026metric=coverage)](https://sonarcloud.io/summary/overall?id=com.github.robtimus%3Aiterator-utils)\n[![Known Vulnerabilities](https://snyk.io/test/github/robtimus/iterator-utils/badge.svg)](https://snyk.io/test/github/robtimus/iterator-utils)\n\nProvides classes and interfaces to help implement iterators. Below are some examples; for a full list, see the [API](https://robtimus.github.io/iterator-utils/apidocs/).\n\n## LookaheadIterator\n\nClass [LookaheadIterator](https://robtimus.github.io/iterator-utils/apidocs/com/github/robtimus/util/iterator/LookaheadIterator.html) is a base class that lets you easily implement iterators that need to calculate the next value in order to let `hasNext()` return whether or not there is a next value.\n\n## StreamLikeIterator\n\nInterface [StreamLikeIterator](https://robtimus.github.io/iterator-utils/apidocs/com/github/robtimus/util/iterator/StreamLikeIterator.html) extends `Iterator` to add several `Stream` operations. Unlike streams, instances of `StreamLikeIterator` support removal if a) the original iterator does, and b) no intermediate step removes support for removal (e.g., `flatMap`).\n\n## IteratorUtils\n\nClass [IteratorUtils](https://robtimus.github.io/iterator-utils/apidocs/com/github/robtimus/util/iterator/IteratorUtils.html) provides several utility methods. These include:\n\n* `singletonIterator` to create an (unmodifiable) iterator containing only a single element.\n* `unmodifiableIterator` to create an unmodifiable wrapper around an iterator.\n* methods to wrap an existing iterator to add functionality of `Stream`. This allows single operations to be used without having to use `StreamLikeIterator`.\n* methods to create a `Stream` for an iterator.\n* methods to create a single iterator backed by several other iterators or iterables.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobtimus%2Fiterator-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobtimus%2Fiterator-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobtimus%2Fiterator-utils/lists"}