{"id":18184287,"url":"https://github.com/vovandreevik/stream-api","last_synced_at":"2025-10-16T20:30:23.140Z","repository":{"id":212542137,"uuid":"731754773","full_name":"vovandreevik/Stream-API","owner":"vovandreevik","description":"Java project that demonstrates various stream operations","archived":false,"fork":false,"pushed_at":"2024-03-25T12:14:29.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T14:49:46.403Z","etag":null,"topics":["collections","java","list","map","optional","stream"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vovandreevik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-12-14T19:57:03.000Z","updated_at":"2024-04-04T09:59:59.000Z","dependencies_parsed_at":"2025-02-13T14:49:50.524Z","dependency_job_id":"3a62b8bb-9b8c-47a7-9102-4ecda44e8d1c","html_url":"https://github.com/vovandreevik/Stream-API","commit_stats":null,"previous_names":["vovandreevik/steam-api","vovandreevik/stream-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vovandreevik%2FStream-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vovandreevik%2FStream-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vovandreevik%2FStream-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vovandreevik%2FStream-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vovandreevik","download_url":"https://codeload.github.com/vovandreevik/Stream-API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648977,"owners_count":20972945,"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":["collections","java","list","map","optional","stream"],"created_at":"2024-11-02T21:03:55.522Z","updated_at":"2025-10-16T20:30:18.092Z","avatar_url":"https://github.com/vovandreevik.png","language":"Java","readme":"# StreamExample\n\nStreamExample is a Java project that demonstrates various stream operations using Java 8 Streams and provides corresponding test cases.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Methods](#methods)\n- [Tests](#tests)\n\n## Installation\n\nTo use StreamExample in your project, you can follow these steps:\n\n1. Clone this repository:\n\n    ```bash\n    git clone https://github.com/your_username/StreamExample.git\n    ```\n\n2. Import the project into your preferred Java IDE.\n\n## Usage\n\nThe StreamExample project provides several utility methods for working with streams and collections in Java. You can use these methods in your own Java projects by importing the `StreamExample` class and calling the desired methods.\n\nExample usage:\n\n```java\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class Main {\n    public static void main(String[] args) {\n        List\u003cInteger\u003e numbers = Arrays.asList(1, 2, 3, 4, 5);\n        double average = StreamExample.average(numbers);\n        System.out.println(\"Average: \" + average);\n    }\n}\n```\n\n## Methods\n`average(List\u003cInteger\u003e numbers)`\nCalculates the average of a list of integers.\n\n`upperCaseAndAddPrefix(List\u003cString\u003e strings)`\nConverts a list of strings to uppercase and adds a prefix to each string.\n\n`uniqueSquares(List\u003cInteger\u003e numbers)`\nFilters unique integers from a list, squares them, and returns a list of unique squares.\n\n`filterAndSortByLetter(Collection\u003cString\u003e strings, char letter)`\nFilters and sorts strings from a collection based on a specified letter.\n\n`getLastElementOrThrowException(Collection\u003cT\u003e collection)`\nGets the last element from a collection or throws an exception if the collection is empty.\n\n`getLastElement(Collection\u003cT\u003e collection)`\nGets the last element from a collection as an optional.\n\n`sumOfEvenNumbers(int[] numbers)`\nCalculates the sum of even numbers in an array.\n\n`convertToMap(List\u003cString\u003e strings)`\nConverts a list of strings to a map where the first character of each string is the key and the remaining characters are the value.\n\n## Tests\nThe project includes JUnit tests to verify the functionality of each method. You can run these tests to ensure that the methods work as expected.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvovandreevik%2Fstream-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvovandreevik%2Fstream-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvovandreevik%2Fstream-api/lists"}