{"id":17248940,"url":"https://github.com/pakoito/rxtuples","last_synced_at":"2025-04-14T05:31:42.185Z","repository":{"id":139227828,"uuid":"47582117","full_name":"pakoito/RxTuples","owner":"pakoito","description":"Simple tuples to use with RxJava [STABLE]","archived":false,"fork":false,"pushed_at":"2017-03-22T00:07:44.000Z","size":100,"stargazers_count":112,"open_issues_count":1,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-27T19:51:20.667Z","etag":null,"topics":["android","functional-programming","java"],"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}},"created_at":"2015-12-07T22:04:18.000Z","updated_at":"2022-11-29T16:51:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"df1138a4-53a9-44e3-a914-11e3afe7b659","html_url":"https://github.com/pakoito/RxTuples","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakoito%2FRxTuples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakoito%2FRxTuples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakoito%2FRxTuples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakoito%2FRxTuples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pakoito","download_url":"https://codeload.github.com/pakoito/RxTuples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248826618,"owners_count":21167723,"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":["android","functional-programming","java"],"created_at":"2024-10-15T06:42:30.991Z","updated_at":"2025-04-14T05:31:41.924Z","avatar_url":"https://github.com/pakoito.png","language":"Java","readme":"# RxTuples\n\nRxTuples is a library to smooth RxJava usage by adding simple Tuple creation functions.\n\nFor the RxJava 2.X version, please go to [RxTuples2](https://github.com/pakoito/RxTuples2).\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 FuncN 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:RxTuples:1.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\u003eRxTuples\u003c/artifactId\u003e\n        \u003cversion\u003e1.0.0\u003c/version\u003e\n    \u003c/dependency\u003e\n\n## License\n\nCopyright (c) pakoito 2015\n\nThe Apache Software License, Version 2.0\n\nSee LICENSE.md\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpakoito%2Frxtuples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpakoito%2Frxtuples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpakoito%2Frxtuples/lists"}