{"id":17248959,"url":"https://github.com/pakoito/rxtuples2","last_synced_at":"2025-07-02T15:33:16.260Z","repository":{"id":139227837,"uuid":"79467343","full_name":"pakoito/RxTuples2","owner":"pakoito","description":"Simple tuples to use with RxJava2 [STABLE]","archived":false,"fork":false,"pushed_at":"2017-03-22T00:12:58.000Z","size":111,"stargazers_count":22,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T04:57:01.920Z","etag":null,"topics":["functional-programming","java","rxjava2"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pakoito.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2017-01-19T15:34:56.000Z","updated_at":"2021-05-28T15:23:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"5b02d647-0d1f-41f6-b880-845d7f1b91f5","html_url":"https://github.com/pakoito/RxTuples2","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pakoito/RxTuples2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakoito%2FRxTuples2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakoito%2FRxTuples2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakoito%2FRxTuples2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakoito%2FRxTuples2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pakoito","download_url":"https://codeload.github.com/pakoito/RxTuples2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakoito%2FRxTuples2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263166219,"owners_count":23424120,"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":["functional-programming","java","rxjava2"],"created_at":"2024-10-15T06:42:33.307Z","updated_at":"2025-07-02T15:33:16.245Z","avatar_url":"https://github.com/pakoito.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RxTuples2\n\nRxTuples2 is a library to smooth RxJava2 usage by adding simple Tuple creation functions.\n\nFor the RxJava 1.X version, please go to [RxTuples](https://github.com/pakoito/RxTuples).\n\n## Rationale\n\nQuite often when using RxJava you find the need to forward a value alongside the result of an operation, combine several values, or simply adding an external value to the current internal state of the chain. For this you either create ad-hoc types that may only be used locally, which is inefficient.\n\nOther languages have the concept of a Tuple built into them, which is an in-place list of values. Lots of Java libraries implement their own concept of Tuple, being a Pair, a Point, or VecX types. This library uses [javatuples](http://www.javatuples.org/) in an attempt to unify them[.](https://imgs.xkcd.com/comics/standards.png) Javatuples are all \"typesafe, immutable, iterable, serializable, comparable\" classes  ranging from 1 to 10 elements.\n\n## Usage\n\nRxTuples come as lazily evaluated FunctionN and its main use case is alongside the `combineLatest()`, `withLatestFrom()`, `zip()`, and `zipWith()` operators.\n\nZip a list element into a pair with their position:\n\n    Observable.zip(Observable.from(myStringList), Observable.range(0, myStringList.size()), \n                   RxTuples.\u003cString, Integer\u003etoPair());\n\nMerge the value of several hot observables:\n\n    Observable.combineLatest(networkSubject(), bluetoothSubject(), compassSubject(), \n                             RxTuples.\u003cNetworkStatus, BluetoothState, CompassPosition\u003etoTriplet());\n\nGet the previous element from a sequence alongside the current one:\n\n    Observable.zip(compassSubject(), compassSubject().skip(1), \n                   RxTuples.\u003cCompassPosition, CompassPosition\u003etoPair());\n\nor more complicated cases\n\n    Observable.just(Quintet.with(1, 2, 3, 4, 5))\n              .zipWith(\n                    Observable.just(Triplet.with(6, 7, 8)),\n                    RxTuples.\u003cInteger, Integer, Integer, Integer, Integer, Integer, Integer, Integer\u003e toOctetFromQuintet());\n\n## Distribution\n\nAdd as a dependency to your `build.gradle`\n\n    repositories {\n        ...\n        maven { url \"https://jitpack.io\" }\n        ...\n    }\n    \n    dependencies {\n        ...\n        compile 'com.github.pakoito:RxTuples2:1.0.0'\n        ...\n    }\n\nor to your `pom.xml`\n\n    \u003crepositories\u003e\n        \u003crepository\u003e\n            \u003cid\u003ejitpack.io\u003c/id\u003e\n            \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n        \u003c/repository\u003e\n    \u003c/repositories\u003e\n    \n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.github.pakoito\u003c/groupId\u003e\n        \u003cartifactId\u003eRxTuples2\u003c/artifactId\u003e\n        \u003cversion\u003e1.0.0\u003c/version\u003e\n    \u003c/dependency\u003e\n\n## License\n\nCopyright (c) pakoito 2017\n\nThe Apache Software License, Version 2.0\n\nSee LICENSE.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpakoito%2Frxtuples2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpakoito%2Frxtuples2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpakoito%2Frxtuples2/lists"}