You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RxTuples is a library to smooth RxJava usage by adding simple Tuple creation functions.
For the RxJava 2.X version, please go to RxTuples2.
Rationale
Quite 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.
Other 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 in an attempt to unify them. Javatuples are all "typesafe, immutable, iterable, serializable, comparable" classes ranging from 1 to 10 elements.
Usage
RxTuples come as lazily evaluated FuncN and its main use case is alongside the combineLatest, withLatestFrom, zip, and zipWith operators.
Zip a list element into a pair with their position: