{"id":13803841,"url":"https://github.com/eleventigers/rxeither","last_synced_at":"2026-02-01T06:35:24.177Z","repository":{"id":57737278,"uuid":"49574503","full_name":"eleventigers/rxeither","owner":"eleventigers","description":"Either type for RxJava","archived":false,"fork":false,"pushed_at":"2016-03-22T10:11:57.000Z","size":98,"stargazers_count":91,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-13T16:40:45.146Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eleventigers.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-13T13:10:32.000Z","updated_at":"2024-07-04T02:37:57.000Z","dependencies_parsed_at":"2022-08-24T14:59:41.038Z","dependency_job_id":null,"html_url":"https://github.com/eleventigers/rxeither","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/eleventigers/rxeither","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eleventigers%2Frxeither","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eleventigers%2Frxeither/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eleventigers%2Frxeither/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eleventigers%2Frxeither/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eleventigers","download_url":"https://codeload.github.com/eleventigers/rxeither/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eleventigers%2Frxeither/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28970651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T05:48:53.985Z","status":"ssl_error","status_checked_at":"2026-02-01T05:47:55.855Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-08-04T01:00:38.353Z","updated_at":"2026-02-01T06:35:24.160Z","avatar_url":"https://github.com/eleventigers.png","language":"Java","readme":"RxEither [![Build Status](https://travis-ci.org/eleventigers/rxeither.svg?branch=master)](https://travis-ci.org/eleventigers/rxeither)\n========\n\nEither is a value of one of two possible types.\n\nInspired by Jeffrey van Gogh's [discussion][jeffrey] with the Rx.Net users, RxEither is a port of Scala's [Either][either] for the [RxJava][rx] world.\n\nUsage\n-----\n\n* **Progress reporting**\n\n  ```java\n  public class ProgressExample {\n\n       public static void main(String[] args) {\n              PublishSubject\u003cInteger\u003e progress = PublishSubject.create();\n\n              Observable\u003cString\u003e results = Observable.fromCallable(() -\u003e {\n                  progress.onNext(0);\n                  TimeUnit.SECONDS.sleep(1);\n                  progress.onNext(100);\n                  return \"Hello, world!\";\n              }).subscribeOn(Schedulers.io());\n\n              Observable\u003cEither\u003cInteger, String\u003e\u003e either = RxEither.from(progress, results).share();\n\n              RxEither.filterLeft(either).subscribe(System.out::println);\n              RxEither.filterRight(either).toBlocking().subscribe(System.out::println);\n          }\n  }\n  ```\n  Prints:\n\n  ```\n  0\n  100\n  Hello, world!\n  ```\n\n* **Switch**\n\n  ```java\n  public class SwitchActionExample {\n\n      public static void main(String[] args) {\n          System.out.println(\"Type Either a string or an Int: \");\n\n          String in = \"\";\n          Either\u003cString, Integer\u003e either;\n          try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))) {\n              in = reader.readLine();\n              either = Either.right(Integer.parseInt(in));\n          } catch (NumberFormatException | IOException e) {\n              either = Either.left(in);\n          }\n\n          either.fold(\n              s -\u003e {\n                  System.out.println(\"You passed me the String: \" + s);\n              },\n              x -\u003e {\n                  System.out.println(\n                          \"You passed me the Int: \" + x\n                                  + \", which I will increment. \" + x + \" + 1 = \"\n                                  + (x + 1));\n              });\n      }\n  }\n  ```\n\n  Prints:\n\n  ```\n  Type Either a string or an Int:\n  1\n  You passed me the Int: 1, which I will increment. 1 + 1 = 2\n  ```\n\n\nDownload\n--------\nMaven:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003enet.jokubasdargis.rxeither\u003c/groupId\u003e\n  \u003cartifactId\u003erxeither\u003c/artifactId\u003e\n  \u003cversion\u003e1.2.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\nGradle:\n```groovy\ncompile 'net.jokubasdargis.rxeither:rxeither:1.2.0'\n```\n\nSnapshots of the development version are available in [Sonatype's `snapshots` repository][snap].\n\nLicense\n-------\n\n    Copyright 2016 Jokubas Dargis\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n [either]: http://www.scala-lang.org/api/rc2/scala/Either.html\n [rx]: https://github.com/ReactiveX/RxJava/\n [snap]: https://oss.sonatype.org/content/repositories/snapshots/\n [jeffrey]: https://social.msdn.microsoft.com/Forums/en-US/abe175c9-fad6-4d9c-b3e1-012a14f96fda/exposing-progress-vs-data","funding_links":[],"categories":["Utilities"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feleventigers%2Frxeither","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feleventigers%2Frxeither","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feleventigers%2Frxeither/lists"}