{"id":21089803,"url":"https://github.com/blackbaroness/fastutil-extender","last_synced_at":"2025-07-28T10:39:45.971Z","repository":{"id":150214297,"uuid":"615498610","full_name":"BlackBaroness/fastutil-extender","owner":"BlackBaroness","description":"Library built under the fastutil which offers various methods for creating  collections, which makes your code more efficient and faster","archived":false,"fork":false,"pushed_at":"2025-02-26T01:41:28.000Z","size":340,"stargazers_count":5,"open_issues_count":24,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T18:21:20.629Z","etag":null,"topics":["boilerplate","collections","fastutil","java","library","optimization","primitive-collections"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlackBaroness.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-17T20:54:12.000Z","updated_at":"2025-01-02T06:01:51.000Z","dependencies_parsed_at":"2025-01-21T00:49:54.054Z","dependency_job_id":"61a00399-9f6e-46c2-80df-28b9b0900f60","html_url":"https://github.com/BlackBaroness/fastutil-extender","commit_stats":{"total_commits":18,"total_committers":3,"mean_commits":6.0,"dds":"0.16666666666666663","last_synced_commit":"cc3046fe76c788aa4e321ad3061a167ebc55351a"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackBaroness%2Ffastutil-extender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackBaroness%2Ffastutil-extender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackBaroness%2Ffastutil-extender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackBaroness%2Ffastutil-extender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlackBaroness","download_url":"https://codeload.github.com/BlackBaroness/fastutil-extender/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248648644,"owners_count":21139331,"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":["boilerplate","collections","fastutil","java","library","optimization","primitive-collections"],"created_at":"2024-11-19T21:31:36.873Z","updated_at":"2025-04-13T00:23:27.849Z","avatar_url":"https://github.com/BlackBaroness.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Extension built under a [fastutil](https://github.com/vigna/fastutil) library\n\nDon't waste your time by specifying a load factor, creating convertation algorithms,\ncollectors and other boring boilerplate things!\n\nYou need Java 8+ to use this.\n\n## Import to your project\n\nMaven:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.blackbaroness\u003c/groupId\u003e\n    \u003cartifactId\u003efastutil-extender-common\u003c/artifactId\u003e\n    \u003cversion\u003e1.2.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nGradle (Groovy SDK):\n\n```groovy\nimplementation 'io.github.blackbaroness:fastutil-extender-common:1.2.0'\n```\n\nGradle (Kotlin SDK):\n\n```kotlin\nimplementation(\"io.github.blackbaroness:fastutil-extender-common:1.2.0\")\n```\n\n## Features\n\n### 1. Fastest load factors by default\n\nWhile doing benchmarks, I realized that load factor 0.25 significantly speeds up\nhash-based collections, wasting just a bit of RAM. If you don't feel sorry for the\nextra 1MB of RAM, this library is for you.\n\n### 2. Cool stateless factories for lists and sets\n\n```java\nIntListFactory factory = FastList.ints;\n\n// default\nfactory.create();\n\n// with size\nfactory.create(10);\n\n// of array of boxed types\nfactory.of(1, 2, 3);\n\n// of array of primitive types\nfactory.ofArray(1, 2, 3);\n\n// convert from another type\nList\u003cString\u003e stringList = FastList.objects.of(\"1\", \"2\", \"3\");\nfactory.convert(stringList, Integer::parseInt);\n\n// make unmodifiable of synchronized\nfactory.unmodifiable(factory.create());\nfactory.synchronize(factory.create());\n\n// use collectors for streams\nIntStream.of(1, 2, 3).boxed().collect(factory.collector());\nIntStream.of(1, 2, 3).boxed().collect(factory.unmodifiableCollector());\n\n// or use super cool builders\nIntList list = factory.builder()\n    .size(100)\n    .content(1, 2, 3)\n    .threadsafe()\n    .unmodifiable()\n    .build();\n```\n\n### 3. Simple map factory\n\n```java\n// default\nFastMap.newMap();\n\n// with size\nFastMap.newByte2ShortSortedMap(30);\n\n// of pairs (currently only for objects)\nFastMap.newMap(\n    Pair.of(\"s1\", \"s2\")\n);\n\n// make unmodifiable or synchronized\nFastMap.unmodifiable(FastMap.newInt2IntMap());\nFastMap.synchronize(FastMap.newByte2FloatMap());\n```\n\n### 4. Guice support\n\nYou must add `fastutil-extender-guice` module for this.\n\nCombine your modules with fastutil-extender:\n\n```java\nModule module = Modules.combine(/* your modules */, new FastUtilExtenderFactoriesModule());\n```\n\nNow factories will be injected into your classes:\n```java\nclass Example {\n    \n    private final List\u003cObject\u003e list;\n\n    @Inject\n    public Example(BooleanListFactory booleanListFactory) {\n        this.list = booleanListFactory.builder().threadsafe().build();\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackbaroness%2Ffastutil-extender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackbaroness%2Ffastutil-extender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackbaroness%2Ffastutil-extender/lists"}