I have a List of objects in Java, I want to insert an object at index - 1 of the first matched object. How do that using RXJava? I have read Observable.first() but it only get me the first matched object, no index. Thus, I have no reference of where to insert.
Asked
Active
Viewed 181 times
0
-
This isn't 100% clear. If you're doing `Observable.from(myList)...` then knowing the index would not help you. – Oliver Charlesworth Jun 11 '17 at 18:04
-
3Why are you processing the list with rxJava? It is likely the wrong tool for the job. For that matter, you don't want Java Streams either. – Bob Dalgleish Jun 11 '17 at 21:47
-
What do you need as type of the result? A RxJava Observable or a "normal" Java List? – Peti Jun 14 '17 at 08:50