{"id":15029632,"url":"https://github.com/goldmansachs/gs-collections","last_synced_at":"2025-05-14T21:07:56.876Z","repository":{"id":2100848,"uuid":"3041887","full_name":"goldmansachs/gs-collections","owner":"goldmansachs","description":"GS Collections has been migrated to the Eclipse Foundation, re-branded as Eclipse Collections.  https://www.eclipse.org/collections/","archived":false,"fork":false,"pushed_at":"2023-03-20T19:23:56.000Z","size":12935,"stargazers_count":1813,"open_issues_count":25,"forks_count":277,"subscribers_count":178,"default_branch":"master","last_synced_at":"2025-04-06T13:07:48.754Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.eclipse.org/collections/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"plucked/html5-audio-editor","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goldmansachs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-2.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2011-12-23T19:17:17.000Z","updated_at":"2025-03-30T00:40:11.000Z","dependencies_parsed_at":"2023-07-06T01:55:07.809Z","dependency_job_id":null,"html_url":"https://github.com/goldmansachs/gs-collections","commit_stats":{"total_commits":912,"total_committers":41,"mean_commits":22.24390243902439,"dds":0.668859649122807,"last_synced_commit":"fa8bf3e103689efa18bca2ab70203e71cde34b52"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldmansachs%2Fgs-collections","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldmansachs%2Fgs-collections/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldmansachs%2Fgs-collections/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldmansachs%2Fgs-collections/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goldmansachs","download_url":"https://codeload.github.com/goldmansachs/gs-collections/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741202,"owners_count":21154255,"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-09-24T20:11:14.443Z","updated_at":"2025-04-13T16:10:19.584Z","avatar_url":"https://github.com/goldmansachs.png","language":"Java","funding_links":[],"categories":["High Performance","I. Development","Java","Memory and concurrency"],"sub_categories":["6. Useful libraries"],"readme":"# GS Collections is now Eclipse Collections\r\nWe are pleased to announce that GS Collections has been migrated to [the Eclipse Foundation](https://eclipse.org/org/foundation/), re-branded as [Eclipse Collections](https://www.eclipse.org/collections/).\r\n\r\nEclipse Collections 7.0 has the exact same feature set as GS Collections 7.0.\r\n\r\nGoing forward, any new features will be developed in Eclipse Collections. We will only port critical bug fixes to GS Collections.\r\nTo support smooth migration for users, we implemented a conversion application [gsc-ec-converter](https://github.com/eclipse/gsc-ec-converter). Please plan your migration accordingly from GS Collections to Eclipse Collections.\r\n\r\n# GS Collections\r\n\r\n[![][travis img]][travis]\r\n[![][maven img]][maven]\r\n[![][release img]][release]\r\n[![][license img]][license]\r\n\r\nGS Collections is a collections framework for Java. It has JDK-compatible List, Set and Map implementations with a rich API and set of utility classes that work with any JDK compatible Collections, Arrays, Maps or Strings. The iteration protocol was inspired by the Smalltalk collection framework.\r\nThe library modules in GS Collections are compatible with Java 5 (gs-collections-api, gs-collections, and gs-collections-testutils).\r\n\r\n## Quick Example\r\nGS Collections puts iteration methods on the container types. Lambdas are simulated using anonymous inner classes. Here's a code example that demonstrates the usual style of programming with GS Collections.\r\n\r\n```java\r\nMutableList\u003cPerson\u003e people = FastList.newListWith(person1, person2, person3);\r\nMutableList\u003cString\u003e sortedLastNames = people.collect(Person.TO_LAST_NAME).sortThis();\r\nSystem.out.println(\"Comma separated, sorted last names: \" + sortedLastNames.makeString());\r\n```\r\n\r\nPerson.TO_LAST_NAME is defined as a constant Function in the Person class.\r\n\r\n```java\r\npublic static final Function\u003cPerson, String\u003e TO_LAST_NAME = new Function\u003cPerson, String\u003e()\r\n{\r\n    public String valueOf(Person person)\r\n    {\r\n        return person.lastName;\r\n    }\r\n};\r\n\r\n```\r\nIn Java 8, the Function can be replaced with a lambda:\r\n\r\n```java\r\nMutableList\u003cString\u003e sortedLastNames = people.collect(person -\u003e person.getLastName()).sortThis();\r\n```\r\n\r\nOr, a method reference:\r\n\r\n```java\r\nMutableList\u003cString\u003e sortedLastNames = people.collect(Person::getLastName).sortThis();\r\n```\r\n\r\n## Why GS Collections?\r\n* Improves readability and reduces duplication of iteration code (enforces DRY/OAOO)\r\n* Implements several, high-level iteration patterns (select, reject, collect, inject into, etc.) on \"humane\" container interfaces which are extensions of the JDK interfaces\r\n* Provides a consistent mechanism for iterating over Collections, Arrays, Maps, and Strings\r\n* Provides replacements for ArrayList, HashSet, and HashMap optimized for performance and memory usage\r\n* Performs more \"behind-the-scene\" optimizations in utility classes\r\n* Encapsulates a lot of the structural complexity of parallel iteration and lazy evaluation\r\n* Adds new containers including Bag, Interval, Multimap, BiMap, and immutable versions of all types\r\n* Has been under active development since 2005 and is a mature library\r\n\r\n## Documentation\r\nThe best way to learn about GS Collections is to dive into the [code kata](https://github.com/goldmansachs/gs-collections-kata). The kata is a fun way to learn idiomatic GS Collections usage and hone your skills through practice.\r\nPlease refer to the [wiki](https://github.com/goldmansachs/gs-collections/wiki) for more details.\r\n\r\nFor more comprehensive documentation, take a look at the [Reference Guide](http://www.goldmansachs.com/gs-collections/documents/GS%20Collections%20Reference%20Guide%205.0.0.pdf).\r\n\r\n## Contributions\r\nWe currently do all development in an internal Subversion repository and are not prepared to take external contributions. However, we watch the [issue tracker](https://github.com/goldmansachs/gs-collections/issues) for bug reports and feature requests.\r\n\r\n## FAQ\r\n### Why is Goldman Sachs open-sourcing GS Collections?\r\n\r\n* We believe that GS Collections offers a significant advantage over existing solutions. We hope others will benefit from it.\r\n* We believe in the power of the technical community to help improve GS Collections.\r\n* Technology is a huge part of what we do at Goldman Sachs. GS Collections exemplifies our commitment to technology.\r\n* We use open source software in many of our operations. We have benefited from the work of others and we'd like to give something back.\r\n\r\n### Does Goldman Sachs use GS Collections?\r\nYes, we use GS Collections in many of our internal applications.\r\n\r\n## Acquiring GS Collections\r\n\r\n### Download\r\n* [Version 7.0.0](http://www.goldmansachs.com/gs-collections/binaries/gs-collections-7.0.0.zip)\r\n* [Older versions](https://github.com/goldmansachs/gs-collections/releases)\r\n\r\n### Maven\r\n```xml\r\n\u003cdependency\u003e\r\n  \u003cgroupId\u003ecom.goldmansachs\u003c/groupId\u003e\r\n  \u003cartifactId\u003egs-collections-api\u003c/artifactId\u003e\r\n  \u003cversion\u003e7.0.0\u003c/version\u003e\r\n\u003c/dependency\u003e\r\n\r\n\u003cdependency\u003e\r\n  \u003cgroupId\u003ecom.goldmansachs\u003c/groupId\u003e\r\n  \u003cartifactId\u003egs-collections\u003c/artifactId\u003e\r\n  \u003cversion\u003e7.0.0\u003c/version\u003e\r\n\u003c/dependency\u003e\r\n\r\n\u003cdependency\u003e\r\n  \u003cgroupId\u003ecom.goldmansachs\u003c/groupId\u003e\r\n  \u003cartifactId\u003egs-collections-testutils\u003c/artifactId\u003e\r\n  \u003cversion\u003e7.0.0\u003c/version\u003e\r\n  \u003cscope\u003etest\u003c/scope\u003e\r\n\u003c/dependency\u003e\r\n\r\n\u003cdependency\u003e\r\n  \u003cgroupId\u003ecom.goldmansachs\u003c/groupId\u003e\r\n  \u003cartifactId\u003egs-collections-forkjoin\u003c/artifactId\u003e\r\n  \u003cversion\u003e7.0.0\u003c/version\u003e\r\n\u003c/dependency\u003e\r\n```\r\n\r\n### Gradle\r\n\r\n```groovy\r\ncompile 'com.goldmansachs:gs-collections-api:7.0.0'\r\ncompile 'com.goldmansachs:gs-collections:7.0.0'\r\ntestCompile 'com.goldmansachs:gs-collections-testutils:7.0.0'\r\ncompile 'com.goldmansachs:gs-collections-forkjoin:7.0.0'\r\n```\r\n\r\n### Ivy\r\n\r\n```xml\r\n\u003cdependency org=\"com.goldmansachs\" name=\"gs-collections-api\" rev=\"7.0.0\" /\u003e\r\n\u003cdependency org=\"com.goldmansachs\" name=\"gs-collections\" rev=\"7.0.0\" /\u003e\r\n\u003cdependency org=\"com.goldmansachs\" name=\"gs-collections-testutils\" rev=\"7.0.0\" /\u003e\r\n\u003cdependency org=\"com.goldmansachs\" name=\"gs-collections-forkjoin\" rev=\"7.0.0\"/\u003e\r\n```\r\n\r\n[travis]:https://travis-ci.org/goldmansachs/gs-collections\r\n[travis img]:https://travis-ci.org/goldmansachs/gs-collections.svg?branch=master\r\n\r\n[maven]:http://search.maven.org/#search|gav|1|g:\"com.goldmansachs\"%20AND%20a:\"gs-collections\"\r\n[maven img]:https://maven-badges.herokuapp.com/maven-central/com.goldmansachs/gs-collections/badge.svg\r\n\r\n[release]:https://github.com/goldmansachs/gs-collections/releases\r\n[release img]:https://img.shields.io/github/release/goldmansachs/gs-collections.svg\r\n\r\n[license]:LICENSE-2.0.txt\r\n[license img]:https://img.shields.io/badge/License-Apache%202-blue.svg\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoldmansachs%2Fgs-collections","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoldmansachs%2Fgs-collections","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoldmansachs%2Fgs-collections/lists"}